:root{
  --ksa-ink:#211e1b;
  --ksa-muted:#7f766f;
  --ksa-line:#e2dad3;
  --ksa-soft:#f7f4f0;
  --ksa-green:#edf3e9;
  --ksa-pink:#f5ecef;
  --ksa-blue:#eef1f7;
}

body[data-account-page]{
  background:#fbfaf8;
  color:var(--ksa-ink);
}

.ksa-page{
  width:min(1240px,calc(100% - 40px));
  margin:0 auto;
  padding:14px 0 38px;
}

.ksa-breadcrumbs{margin-bottom:10px}

.ksa-eyebrow{
  display:block;
  color:var(--ksa-muted);
  font-size:11px;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
}

.ksa-hero{
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,1fr) 300px;
  align-items:center;
  min-height:205px;
  padding:22px 24px;
  border:1px solid var(--ksa-line);
  border-radius:18px;
  overflow:hidden;
  background:
    radial-gradient(circle at 86% 13%,rgba(255,255,255,.94),transparent 28%),
    linear-gradient(135deg,#f4f0ec,#edf3e9 58%,#f6ecef);
}

.ksa-hero__copy{position:relative;z-index:2}

.ksa-hero h1{
  margin:6px 0 8px;
  max-width:720px;
  font-family:Georgia,serif;
  font-size:clamp(44px,5vw,62px);
  font-weight:400;
  line-height:.94;
  letter-spacing:-.055em;
}

.ksa-hero__copy>p{
  max-width:630px;
  margin:0;
  color:#6f6760;
  font-size:13px;
  line-height:1.5;
}

.ksa-hero__chips{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:14px;
}

.ksa-hero__chips span{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:30px;
  padding:0 10px;
  border:1px solid rgba(67,56,49,.1);
  border-radius:999px;
  background:rgba(255,255,255,.72);
  color:#655d57;
  font-size:11px;
  font-weight:750;
}

.ksa-hero__chips img{
  width:17px;
  height:17px;
  opacity:.55;
}

.ksa-hero__art{
  position:relative;
  height:155px;
}

.ksa-art-profile,
.ksa-art-bottle,
.ksa-art-spark{
  position:absolute;
  display:block;
  object-fit:contain;
}

.ksa-art-profile{
  right:55px;
  top:5px;
  width:110px;
  opacity:.48;
}

.ksa-art-bottle{
  right:0;
  bottom:-40px;
  width:122px;
  opacity:.22;
  transform:rotate(5deg);
}

.ksa-art-spark{
  left:20px;
  top:23px;
  width:78px;
  opacity:.08;
}

.ksa-art-index,
.ksa-art-caption{
  position:absolute;
  color:#827870;
  font-size:9px;
  font-weight:800;
  letter-spacing:.11em;
}

.ksa-art-index{right:0;top:0}
.ksa-art-caption{left:8px;bottom:8px;line-height:1.4}

.ksa-loading[hidden]{display:none!important}

.ksa-loading{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-height:86px;
  margin-top:8px;
  border:1px solid var(--ksa-line);
  border-radius:14px;
  background:#fff;
  color:var(--ksa-muted);
  font-size:12px;
}

.ksa-loading button{
  min-height:36px;
  margin-left:4px;
  padding:0 10px;
  border:1px solid #d8d0c9;
  border-radius:8px;
  background:#fff;
  color:var(--ksa-ink);
  font:inherit;
  font-weight:800;
  cursor:pointer;
}

.ksa-auth{
  display:grid;
  grid-template-columns:minmax(0,.88fr) minmax(360px,1.12fr);
  margin-top:8px;
  border:1px solid var(--ksa-line);
  border-radius:17px;
  overflow:hidden;
  background:#fff;
}

.ksa-auth[hidden],
.ksa-dashboard[hidden]{display:none!important}

.ksa-auth__visual{
  position:relative;
  min-height:380px;
  padding:26px;
  overflow:hidden;
  background:#211e1b;
  color:#fff;
}

.ksa-auth__visual .ksa-eyebrow{color:rgba(255,255,255,.48)}

.ksa-auth__visual h2{
  max-width:390px;
  margin:22px 0 9px;
  font-family:Georgia,serif;
  font-size:34px;
  font-weight:400;
  line-height:.98;
  letter-spacing:-.045em;
}

.ksa-auth__visual>p{
  max-width:390px;
  margin:0;
  color:rgba(255,255,255,.6);
  font-size:12px;
  line-height:1.55;
}

.ksa-auth__benefits{
  display:grid;
  gap:8px;
  margin-top:26px;
}

.ksa-auth__benefits span{
  display:flex;
  align-items:center;
  gap:8px;
  color:rgba(255,255,255,.74);
  font-size:12px;
}

.ksa-auth__benefits img{
  width:25px;
  height:25px;
  filter:brightness(0) invert(1);
  opacity:.58;
}

.ksa-auth__watermark{
  position:absolute;
  right:-46px;
  bottom:-58px;
  width:230px;
  filter:brightness(0) invert(1);
  opacity:.035;
}

.ksa-auth__box{padding:22px}

.ksa-auth__tabs{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:4px;
  margin-bottom:14px;
  padding:4px;
  border-radius:11px;
  background:#f2eeea;
}

.ksa-auth__tabs button{
  min-height:42px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:#766d66;
  font:inherit;
  font-size:12px;
  font-weight:800;
  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,
.ksa-dialog .ks-field{gap:5px}

.ksa-auth .ks-field label,
.ksa-dialog .ks-field label{
  font-size:11px;
  font-weight:700;
}

.ksa-auth .ks-field input,
.ksa-dialog .ks-field input{
  min-height:44px;
  padding:9px 10px;
  border-radius:9px;
  background:#fcfbfa;
  font-size:13px;
}

.ksa-auth__forgot-row{
  display:flex;
  justify-content:flex-end;
  margin-top:-3px;
}

.ksa-auth__forgot-row button{
  min-height:44px;
  padding:0;
  border:0;
  background:transparent;
  color:#8b5a68;
  font:inherit;
  font-size:11px;
  font-weight:800;
  text-decoration:underline;
  text-underline-offset:3px;
  cursor:pointer;
}

.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:11px;
  line-height:1.4;
}

.ksa-auth__secure img{width:22px;height:22px;opacity:.52}

.ksa-btn{
  min-height:44px;
  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:inherit;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
  text-decoration:none;
  transition:transform .18s ease,border-color .18s ease,background .18s ease;
}

.ksa-btn:hover{transform:translateY(-1px);border-color:#cfc5bd}
.ksa-btn:disabled{opacity:.55;cursor:wait;transform:none}
.ksa-btn.primary{background:#211e1b;border-color:#211e1b;color:#fff}
.ksa-btn.logout{color:#a34a5d;background:#fffafb;border-color:#ecd9de}
.ksa-btn svg{width:15px;height:15px;stroke-width:1.6}

.ksa-dashboard{margin-top:8px}

.ksa-dashboard-nav{
  display:flex;
  gap:5px;
  margin-bottom:7px;
  padding:4px;
  border:1px solid var(--ksa-line);
  border-radius:12px;
  background:#fff;
}

.ksa-dashboard-nav a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:0 12px;
  border-radius:8px;
  color:#665e57;
  font-size:11px;
  font-weight:800;
  text-decoration:none;
}

.ksa-dashboard-nav a:hover{background:#f5f1ed;color:#211e1b}

.ksa-profile-card{
  display:grid;
  grid-template-columns:72px minmax(0,1fr) auto;
  gap:15px;
  align-items:center;
  padding:15px 17px;
  border:1px solid var(--ksa-line);
  border-radius:16px;
  background:#fff;
}

.ksa-avatar-wrap{position:relative;width:64px;height:64px}

.ksa-avatar{
  display:grid;
  place-items:center;
  width:64px;
  height:64px;
  border-radius:50%;
  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:4px 0 7px;
  font-family:Georgia,serif;
  font-size:27px;
  font-weight:400;
  letter-spacing:-.04em;
}

.ksa-profile-contacts{
  display:flex;
  flex-wrap:wrap;
  gap:8px 15px;
}

.ksa-profile-contacts span{
  display:flex;
  align-items:center;
  gap:6px;
  min-width:0;
  color:#766d66;
}

.ksa-profile-contacts svg{
  flex:0 0 auto;
  width:13px;
  height:13px;
  stroke-width:1.5;
}

.ksa-profile-contacts b{
  min-width:0;
  overflow-wrap:anywhere;
  font-size:11px;
  font-weight:650;
}

.ksa-profile-card__actions{
  display:flex;
  gap:6px;
}

.ksa-stats{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:7px;
  margin-top:7px;
}

.ksa-stat{
  position:relative;
  display:grid;
  grid-template-columns:38px minmax(0,1fr) 15px;
  gap:10px;
  align-items:center;
  min-height:88px;
  padding:12px;
  border:1px solid rgba(57,48,42,.08);
  border-radius:13px;
  overflow:hidden;
  background:#f7f4f0;
  color:#211e1b;
  text-decoration:none;
}

.ksa-stat.orders{background:#f5ecef}
.ksa-stat.favorites{background:#edf3e9}
.ksa-stat.profile{background:#f5f1e9}
.ksa-stat.bonus{background:#eef1f7}
.ksa-stat[hidden]{display:none!important}

.ksa-stat>img,
.ksa-stat>svg{
  box-sizing:border-box;
  width:34px;
  height:34px;
  object-fit:contain;
  opacity:.55;
}

.ksa-stat>svg{padding:5px}
.ksa-stat div{display:grid;gap:2px}

.ksa-stat span{
  color:#80766f;
  font-size:13px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.ksa-stat strong{
  overflow:hidden;
  font-family:Georgia,serif;
  font-size:21px;
  font-weight:400;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.ksa-stat small{
  color:#857b73;
  font-size:12px;
}

.ksa-stat i{
  font-style:normal;
  opacity:.4;
}

.ksa-content-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) 310px;
  gap:8px;
  align-items:start;
  margin-top:8px;
}

.ksa-orders-panel,
.ksa-useful,
.ksa-data-panel{
  padding:15px;
  border:1px solid var(--ksa-line);
  border-radius:15px;
  background:#fff;
}

.ksa-useful{
  position:sticky;
  top:96px;
}

.ksa-section-head{
  display:flex;
  align-items:flex-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:24px;
  font-weight:400;
  letter-spacing:-.035em;
}

.ksa-section-head p{
  margin:0;
  color:#81776f;
  font-size:13px;
  line-height:1.45;
}

.ksa-section-head>a{
  flex:0 0 auto;
  color:#5c554f;
  font-size:13px;
  font-weight:800;
  text-decoration:none;
}

.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;
  white-space:nowrap;
}

.ksa-order-card__badges{
  display:flex;
  flex-wrap:wrap;
  gap:4px;
  margin-top:7px;
}

.ksa-order-card__badges span{
  padding:4px 6px;
  border-radius:999px;
  background:#f0ece8;
  color:#6d645e;
  font-size:12px;
}

.ksa-order-card__items{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  margin-top:8px;
  padding-top:8px;
  border-top:1px solid #eee8e3;
}

.ksa-order-card__items span{
  color:#7d746d;
  font-size:10px;
}

.ksa-empty-order{
  display:grid;
  grid-template-columns:76px 1fr;
  gap:14px;
  align-items:center;
  min-height:132px;
  padding:13px;
  border:1px dashed #ddd5ce;
  border-radius:12px;
  background:#fbfaf8;
}

.ksa-empty-order__art{position:relative;height:82px}

.ksa-empty-bag{
  position:absolute;
  inset:6px;
  background:url("../svg/account-orders.svg") center/contain no-repeat;
  opacity:.18;
}

.ksa-empty-order__copy h3{
  margin:0 0 4px;
  font-family:Georgia,serif;
  font-size:21px;
  font-weight:400;
}

.ksa-empty-order__copy p{
  margin:0 0 9px;
  color:#81776f;
  font-size:11px;
  line-height:1.45;
}

.ksa-useful-list{display:grid}

.ksa-useful-item{
  display:grid;
  grid-template-columns:32px minmax(0,1fr) 14px;
  gap:9px;
  align-items:center;
  width:100%;
  min-height:54px;
  padding:8px 0;
  border:0;
  border-top:1px solid #eee8e3;
  background:transparent;
  color:#211e1b;
  font:inherit;
  text-align:left;
  text-decoration:none;
  cursor:pointer;
}

.ksa-useful-item:first-child{border-top:0}

.ksa-useful-item>span{
  display:grid;
  place-items:center;
  width:31px;
  height:31px;
  border-radius:9px;
  background:#f4f0ec;
}

.ksa-useful-item svg{
  width:16px;
  height:16px;
  stroke-width:1.6;
}

.ksa-useful-item b{
  display:grid;
  gap:2px;
  font-size:13px;
}

.ksa-useful-item small{
  color:#877d75;
  font-size:12px;
  font-weight:500;
}

.ksa-useful-item>i{
  font-style:normal;
  opacity:.38;
}

.ksa-useful-item[disabled]{
  opacity:.42;
  cursor:not-allowed;
}

.ksa-account-data-grid{
  display:grid;
  grid-template-columns:minmax(0,1.2fr) minmax(300px,.8fr);
  gap:8px;
  margin-top:8px;
}

.ksa-inline-action{
  min-height:38px;
  padding:0 10px;
  border:1px solid #dcd4cd;
  border-radius:8px;
  background:#fff;
  color:#322d29;
  font:inherit;
  font-size:11px;
  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;
  flex-wrap:wrap;
  align-items:center;
  gap:6px;
}

.ksa-address-card__head strong{font-size:11px}

.ksa-address-card__head span{
  padding:3px 5px;
  border-radius:999px;
  background:#e9f0e6;
  color:#53634e;
  font-size:9px;
  font-weight:800;
}

.ksa-address-card p{
  margin:5px 0 0;
  color:#756d66;
  font-size:13px;
  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:44px;
  padding:0 8px;
  border:1px solid #ddd5ce;
  border-radius:7px;
  background:#fff;
  color:#4c4540;
  font:inherit;
  font-size:10px;
  font-weight:800;
  cursor:pointer;
}

.ksa-address-card__actions button.danger{color:#9c4c54}

.ksa-address-empty{
  padding:16px;
  border:1px dashed #ddd5ce;
  border-radius:11px;
  background:#fbfaf8;
  color:#837a72;
  font-size:11px;
  line-height:1.45;
}

.ksa-linked-list{display:grid}

.ksa-linked-list>div{
  display:grid;
  grid-template-columns:78px 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{
  color:#8c827a;
  font-size:13px;
}

.ksa-linked-list strong{
  min-width:0;
  overflow-wrap:anywhere;
  text-align:right;
  font-size:13px;
}

.ksa-linked-value{
  display:grid;
  justify-items:end;
  gap:5px;
  min-width:0;
}

.ksa-linked-value small{
  color:#887f77;
  font-size:12px;
  line-height:1.4;
  text-align:right;
}

.ksa-linked-value small:empty{display:none}

.ksa-telegram-link-btn{
  min-height:44px;
  padding:0 9px;
  border:1px solid #d8d0c9;
  border-radius:8px;
  background:#fff;
  color:#4d4641;
  font:inherit;
  font-size:13px;
  font-weight:800;
  cursor:pointer;
}

.ksa-telegram-link-btn[hidden]{display:none!important}

.ksa-address-default{
  display:flex;
  align-items:center;
  gap:7px;
  min-height:34px;
  color:#6f675f;
  font-size:11px;
}

.ksa-address-default input{
  width:17px;
  height:17px;
}

.ksa-dialog{
  width:min(540px,calc(100% - 24px));
  max-height:92vh;
  max-height:92dvh;
  padding:0;
  border:0;
  border-radius:18px;
  overflow:auto;
  overscroll-behavior:contain;
  background:transparent;
  box-shadow:0 25px 70px rgba(33,28,24,.2);
}

.ksa-dialog::backdrop{
  background:rgba(28,24,21,.42);
  backdrop-filter:blur(4px);
}

.ksa-dialog__card{
  position:relative;
  padding:21px;
  border:1px solid var(--ksa-line);
  border-radius:18px;
  background:#fff;
}

.ksa-dialog__close{
  position:absolute;
  top:11px;
  right:11px;
  width:44px;
  height:44px;
  border:1px solid #e3dcd5;
  border-radius:50%;
  background:#fff;
  color:#4d4641;
  font-size:20px;
  cursor:pointer;
}

.ksa-dialog h2{
  margin:7px 46px 5px 0;
  font-family:Georgia,serif;
  font-size:27px;
  font-weight:400;
}

.ksa-dialog p{
  margin:0 0 13px;
  color:#81776f;
  font-size:11px;
  line-height:1.45;
}

.ksa-dialog__grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}

.ksa-dialog__grid .full{grid-column:1/-1}

.ksa-dialog__grid small{
  display:block;
  margin-top:4px;
  color:#897f77;
  font-size:10px;
  line-height:1.4;
}

.ksa-dialog__actions{
  display:flex;
  justify-content:flex-end;
  gap:7px;
  margin-top:13px;
}

.ksa-footer{margin-top:0}

@media(max-width:980px){
  .ksa-hero{grid-template-columns:minmax(0,1fr) 240px}
  .ksa-content-grid{grid-template-columns:1fr}
  .ksa-useful{position:static}
  .ksa-account-data-grid{grid-template-columns:1fr}
  .ksa-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media(max-width:700px){
  body[data-account-page]{
    padding-bottom:calc(76px + env(safe-area-inset-bottom));
  }

  .ksa-page{
    width:calc(100% - 18px);
    padding-top:9px;
  }

  .ksa-breadcrumbs{display:none}

  body[data-account-page] .ks2-mobile-nav{
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    height:calc(68px + env(safe-area-inset-bottom));
  }

  body[data-account-page] .ks2-mobile-nav a{
    min-width:0;
    padding-inline:2px;
  }

  body[data-account-page] .ks2-mobile-nav span{font-size:12px!important}
  body[data-account-page] .ks2-mobile-nav svg{width:20px;height:20px}

  .ksa-hero{
    min-height:170px;
    padding:15px;
    border-radius:15px;
    grid-template-columns:1fr;
    align-items:start;
  }

  .ksa-hero__copy{max-width:82%}
  .ksa-hero h1{font-size:37px}
  .ksa-hero__copy>p{font-size:12px}

  .ksa-hero__chips{
    gap:4px;
    margin-top:11px;
  }

  .ksa-hero__chips span{
    min-height:28px;
    padding:0 8px;
    font-size:10px;
  }

  .ksa-hero__chips span:nth-child(2){display:none}

  .ksa-hero__art{
    position:absolute;
    top:7px;
    right:4px;
    width:118px;
    height:108px;
    opacity:.38;
  }

  .ksa-hero__art:before,
  .ksa-art-index,
  .ksa-art-caption,
  .ksa-art-bottle{display:none}

  .ksa-art-profile{right:0;top:2px;width:88px}
  .ksa-art-spark{left:0;top:34px;width:50px}

  .ksa-loading{
    min-height:70px;
    border-radius:13px;
  }

  .ksa-auth{
    grid-template-columns:1fr;
    margin-top:7px;
    border-radius:14px;
  }

  .ksa-auth__visual{
    min-height:160px;
    padding:16px;
  }

  .ksa-auth__visual h2{
    margin-top:12px;
    font-size:27px;
  }

  .ksa-auth__visual>p{font-size:11px}
  .ksa-auth__benefits{grid-template-columns:repeat(3,1fr);gap:5px;margin-top:15px}
  .ksa-auth__benefits span{display:grid;justify-items:start;gap:5px;font-size:10px}
  .ksa-auth__benefits img{width:21px;height:21px}
  .ksa-auth__box{padding:13px}
  .ksa-auth__grid{grid-template-columns:1fr}

  .ksa-auth .ks-field input,
  .ksa-dialog .ks-field input{
    min-height:46px;
    font-size:16px;
  }

  .ksa-dashboard-nav{
    margin:0 -9px 7px;
    padding:4px 9px;
    border-width:1px 0;
    border-radius:0;
    overflow:auto;
    scrollbar-width:none;
  }

  .ksa-dashboard-nav::-webkit-scrollbar{display:none}

  .ksa-dashboard-nav a{
    flex:0 0 auto;
    min-height:44px;
    white-space:nowrap;
  }

  .ksa-profile-card{
    grid-template-columns:58px minmax(0,1fr);
    gap:11px;
    padding:12px;
    border-radius:14px;
  }

  .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;
    gap:6px;
    margin:7px -9px 0;
    padding:0 9px 4px;
    overflow:auto;
    scrollbar-width:none;
  }

  .ksa-stats::-webkit-scrollbar{display:none}

  .ksa-stat{
    flex:0 0 190px;
    min-height:80px;
  }

  .ksa-content-grid{margin-top:5px}
  .ksa-orders-panel,
  .ksa-useful,
  .ksa-data-panel{
    padding:12px;
    border-radius:13px;
  }

  .ksa-section-head{align-items:flex-start}
  .ksa-section-head h2{font-size:21px}
  .ksa-section-head p{max-width:235px}

  .ksa-empty-order{
    grid-template-columns:60px 1fr;
    min-height:112px;
    padding:10px;
  }

  .ksa-empty-order__art{height:70px}
  .ksa-empty-order__copy h3{font-size:18px}

  .ksa-account-data-grid{margin-top:5px}

  .ksa-address-card{grid-template-columns:1fr}
  .ksa-address-card__actions{justify-content:flex-end}

  .ksa-address-card__actions button,
  .ksa-inline-action,
  .ksa-telegram-link-btn{
    min-height:44px;
  }

  .ksa-linked-list>div{grid-template-columns:72px 1fr}

  .ksa-dialog{
    width:calc(100% - 14px);
    max-height:94dvh;
  }

  .ksa-dialog__card{
    padding:16px 14px calc(14px + env(safe-area-inset-bottom));
  }

  .ksa-dialog__grid{grid-template-columns:1fr}
  .ksa-dialog__grid .full{grid-column:auto}

  .ksa-dialog__actions{
    position:sticky;
    bottom:0;
    padding-top:9px;
    background:#fff;
  }

  .ksa-dialog__actions .ksa-btn{
    flex:1 1 0;
    min-height:46px;
  }

  .ksa-footer{display:none}
}

@media(max-width:430px){
  .ksa-hero__copy{max-width:78%}
  .ksa-profile-card__actions{grid-template-columns:1fr}
  .ksa-section-head{display:block}
  .ksa-section-head>a,
  .ksa-inline-action{
    display:inline-flex;
    margin-top:8px;
  }
  .ksa-auth__benefits{grid-template-columns:1fr}
  .ksa-auth__benefits span:nth-child(2),
  .ksa-auth__benefits span:nth-child(3){display:none}
}

@media(max-width:390px){
  .ksa-hero__copy{max-width:100%}
  .ksa-hero__art{display:none}
  .ksa-hero h1{font-size:35px}
  .ksa-stat{flex-basis:176px}
}

@media(prefers-reduced-motion:reduce){
  .ksa-btn{transition:none}
}


/* Account auth fallback: password visibility control */
.ksa-password-field{position:relative}
.ksa-password-field input{padding-right:49px!important}
.ksa-password-field>[data-account-password-toggle]{
  position:absolute;
  top:50%;
  right:2px;
  transform:translateY(-50%);
  width:44px;
  height:44px;
  padding:0;
  border:0;
  border-radius:8px;
  display:grid;
  place-items:center;
  background:transparent;
  color:#756b64;
  cursor:pointer;
}
.ksa-password-field>[data-account-password-toggle]:hover{background:#f3efeb}
.ksa-password-field>[data-account-password-toggle] svg{width:18px;height:18px;stroke-width:1.5}
.ksa-password-field>[data-account-password-toggle]:focus-visible{outline:2px solid #211e1b;outline-offset:2px}


/* Loyalty / Beauty Coins */
.ksa-loyalty{
  margin-top:10px;
  padding:16px;
  border:1px solid var(--ksa-line);
  border-radius:16px;
  background:
    radial-gradient(circle at 88% 12%,rgba(255,255,255,.9),transparent 22%),
    linear-gradient(135deg,#f4f0ea,#eef3e9 58%,#f7eef1);
}
.ksa-loyalty[hidden]{display:none!important}
.ksa-loyalty__head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:18px;
  margin-bottom:12px;
}
.ksa-loyalty__head h2{
  margin:4px 0 4px;
  font-family:Georgia,serif;
  font-size:31px;
  font-weight:400;
  letter-spacing:-.04em;
}
.ksa-loyalty__head p{
  margin:0;
  max-width:650px;
  color:var(--ksa-muted);
  font-size:12px;
  line-height:1.45;
}
.ksa-loyalty__grid{
  display:grid;
  grid-template-columns:minmax(260px,.8fr) minmax(0,1.2fr);
  gap:8px;
}
.ksa-loyalty-balance,
.ksa-loyalty-benefits,
.ksa-loyalty-history{
  border:1px solid rgba(74,63,55,.1);
  border-radius:14px;
  background:rgba(255,255,255,.82);
}
.ksa-loyalty-balance{
  min-height:210px;
  padding:16px;
  display:flex;
  flex-direction:column;
}
.ksa-loyalty-balance>span{
  color:#7e746c;
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.ksa-loyalty-balance>strong{
  margin:12px 0 4px;
  display:flex;
  align-items:flex-end;
  gap:7px;
  font-family:Georgia,serif;
  font-weight:400;
}
.ksa-loyalty-balance>strong b{
  font-size:46px;
  line-height:.9;
  font-weight:400;
  letter-spacing:-.05em;
}
.ksa-loyalty-balance>strong small{
  padding-bottom:4px;
  color:#7b7169;
  font:800 11px/1 system-ui,sans-serif;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.ksa-loyalty-balance>p{
  margin:4px 0 0;
  color:var(--ksa-muted);
  font-size:11px;
}
.ksa-loyalty-chips{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  margin-top:auto;
  padding-top:14px;
}
.ksa-loyalty-chips span{
  min-height:28px;
  padding:0 8px;
  border:1px solid rgba(74,63,55,.09);
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  background:#fff;
  color:#625a54;
  font-size:10px;
  font-weight:750;
}
.ksa-loyalty-benefits{padding:14px}
.ksa-loyalty-block-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:12px;
  margin-bottom:9px;
}
.ksa-loyalty-block-head span{
  display:block;
  color:#8a8179;
  font-size:10px;
  font-weight:800;
  letter-spacing:.11em;
  text-transform:uppercase;
}
.ksa-loyalty-block-head h3{
  margin:3px 0 0;
  font-size:15px;
}
.ksa-loyalty-block-head>small{
  color:#928981;
  font-size:10px;
}
.ksa-loyalty-benefit-list{
  display:grid;
  gap:6px;
}
.ksa-loyalty-benefit{
  min-width:0;
  min-height:55px;
  padding:8px;
  border:1px solid #ebe4de;
  border-radius:10px;
  display:grid;
  grid-template-columns:30px minmax(0,1fr);
  gap:8px;
  align-items:center;
  background:#fff;
}
.ksa-loyalty-benefit>span{
  width:30px;
  height:30px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:#edf3e9;
  color:#61715f;
  font-size:9px;
  font-weight:900;
}
.ksa-loyalty-benefit strong{
  display:block;
  font-size:13px;
}
.ksa-loyalty-benefit small{
  display:block;
  margin-top:2px;
  color:#7f766f;
  font-size:12px;
  line-height:1.35;
}
.ksa-loyalty-history{
  margin-top:8px;
  padding:14px;
}
.ksa-loyalty-history-list{
  display:grid;
  gap:5px;
}
.ksa-loyalty-history-item{
  min-height:52px;
  padding:7px 8px;
  border:1px solid #ece5df;
  border-radius:10px;
  display:grid;
  grid-template-columns:32px minmax(0,1fr) auto;
  gap:9px;
  align-items:center;
  background:#fff;
}
.ksa-loyalty-history-item__icon{
  width:30px;
  height:30px;
  border-radius:50%;
  display:grid;
  place-items:center;
  font-size:16px;
  font-weight:700;
}
.ksa-loyalty-history-item__icon.is-plus{
  background:#edf4e9;
  color:#58705c;
}
.ksa-loyalty-history-item__icon.is-minus{
  background:#f6ecef;
  color:#8b5a68;
}
.ksa-loyalty-history-item>div:nth-child(2) strong{
  display:block;
  font-size:13px;
}
.ksa-loyalty-history-item>div:nth-child(2) small{
  display:block;
  margin-top:2px;
  color:#918880;
  font-size:12px;
}
.ksa-loyalty-history-item__amount{
  text-align:right;
}
.ksa-loyalty-history-item__amount b{
  display:block;
  font-size:12px;
}
.ksa-loyalty-history-item__amount small{
  display:block;
  margin-top:1px;
  color:#9a9189;
  font-size:9px;
  text-transform:uppercase;
}
.ksa-loyalty-history-item__amount.is-plus b{color:#58705c}
.ksa-loyalty-history-item__amount.is-minus b{color:#8b5a68}
.ksa-loyalty-empty{
  min-height:68px;
  padding:13px;
  border:1px dashed #ddd5ce;
  border-radius:10px;
  display:flex;
  align-items:center;
  color:#877e76;
  font-size:11px;
  line-height:1.45;
}
.ksa-loyalty-dialog{width:min(560px,calc(100% - 24px))}
.ksa-loyalty-dialog__card{padding:24px}
.ksa-loyalty-rules{
  display:grid;
  gap:7px;
  margin-top:14px;
}
.ksa-loyalty-rule{
  min-height:62px;
  padding:9px;
  border:1px solid #e7dfd8;
  border-radius:11px;
  display:grid;
  grid-template-columns:32px minmax(0,1fr);
  gap:9px;
  align-items:start;
  background:#fff;
}
.ksa-loyalty-rule>span{
  width:30px;
  height:30px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:#f1ede9;
  color:#7c726a;
  font-size:9px;
  font-weight:900;
}
.ksa-loyalty-rule strong{
  display:block;
  font-size:13px;
}
.ksa-loyalty-rule p{
  margin:3px 0 0;
  color:#766d66;
  font-size:13px;
  line-height:1.45;
}

@media(max-width:760px){
  .ksa-loyalty{
    margin-top:8px;
    padding:12px;
    border-radius:14px;
  }
  .ksa-loyalty__head{
    display:grid;
    gap:10px;
  }
  .ksa-loyalty__head h2{font-size:27px}
  .ksa-loyalty__head .ksa-inline-action{
    width:100%;
    min-height:44px;
  }
  .ksa-loyalty__grid{grid-template-columns:1fr}
  .ksa-loyalty-balance{min-height:185px}
  .ksa-loyalty-benefits,
  .ksa-loyalty-history{padding:11px}
  .ksa-loyalty-history-item{
    grid-template-columns:30px minmax(0,1fr) auto;
  }
  .ksa-loyalty-dialog{
    width:100%;
    max-height:92dvh;
    margin:auto 0 0;
    border-radius:20px 20px 0 0;
  }
  .ksa-loyalty-dialog__card{
    padding:18px 14px max(18px,env(safe-area-inset-bottom));
    border-radius:20px 20px 0 0;
  }
}
@media(max-width:390px){
  .ksa-loyalty{padding:10px}
  .ksa-loyalty-balance>strong b{font-size:42px}
  .ksa-loyalty-history-item{padding-inline:6px}
}


/* Stage 24 — account forms: clear errors, touch-friendly inputs and responsive layout */
body[data-account-page] .ksa-field-hint{
  display:block;color:#776d65;font-size:12px;line-height:1.45;font-weight:450
}
body[data-account-page] .ksa-field-error{
  display:block;color:#9d4545;font-size:12px;line-height:1.45;font-weight:700
}
body[data-account-page] .ksa-field-error:empty{display:none}
body[data-account-page] .ks-field.is-invalid input,
body[data-account-page] .ks-field input[aria-invalid="true"]{
  border-color:#c58080!important;background:#fffafa
}
body[data-account-page] .ksa-auth__form .ks-field,
body[data-account-page] .ksa-dialog__grid .ks-field{
  min-width:0;gap:6px
}
body[data-account-page] .ksa-auth__form .ks-field input,
body[data-account-page] .ksa-dialog__grid .ks-field input{
  min-width:0;min-height:47px;font-size:15px;line-height:1.45
}
body[data-account-page] .ksa-auth__form .ks-field label,
body[data-account-page] .ksa-dialog__grid .ks-field label{
  font-size:12px;letter-spacing:.015em;line-height:1.35
}
body[data-account-page] .ksa-register-note{
  margin:4px 0 12px;line-height:1.6;font-size:12px;color:#6c625c
}
body[data-account-page] .ksa-register-note a{
  color:#46382e;font-weight:750;text-decoration:underline;text-underline-offset:2px
}
body[data-account-page] .ksa-auth__form button[type="submit"]{
  min-height:47px;font-size:14px
}
body[data-account-page] .ksa-dialog__grid small{line-height:1.5;overflow-wrap:anywhere}
body[data-account-page] .ksa-dashboard-notice{
  grid-column:1/-1;max-width:100%;margin:5px 0 0
}
body[data-account-page] .ksa-auth__form :is(input,button,a):focus-visible,
body[data-account-page] .ksa-dialog :is(input,button,a):focus-visible,
body[data-account-page] .ksa-profile-card__actions button:focus-visible{
  outline:3px solid #927a68;outline-offset:2px
}
@media(max-width:700px){
  body[data-account-page] .ksa-auth__form .ks-field input,
  body[data-account-page] .ksa-dialog__grid .ks-field input{
    font-size:16px;min-height:49px
  }
  body[data-account-page] .ksa-auth__form .ks-field label,
  body[data-account-page] .ksa-dialog__grid .ks-field label{font-size:13px}
  body[data-account-page] .ksa-field-hint,
  body[data-account-page] .ksa-field-error{font-size:12px}
  body[data-account-page] .ksa-register-note{font-size:13px}
}


/* Stage 28 — loyalty balance and usable value */
body[data-account-page] .ksa-loyalty-value{
  margin:8px 0 13px;padding:11px 12px;background:#fffaf4;
  border:1px solid #e4dbd1;border-radius:7px;
  color:#5f554b;line-height:1.5;font-size:13px
}
body[data-account-page] .ksa-loyalty-value[hidden]{display:none!important}
body[data-account-page] .ksa-loyalty-cta{
  display:inline-flex;align-items:center;justify-content:center;gap:7px;
  min-height:42px;margin-top:12px;padding:10px 13px;
  border:1px solid #d3c5bb;border-radius:6px;
  background:#fff;color:#40362f;font-size:13px;font-weight:750;
  text-decoration:none;max-width:100%;text-align:center
}
body[data-account-page] .ksa-loyalty-cta:hover{background:#f6f0e9}
body[data-account-page] .ksa-loyalty-history-note{
  margin:12px 0 0;color:#756a60;font-size:12px;line-height:1.55
}
body[data-account-page] .ksa-loyalty :is(a,button):focus-visible{
  outline:3px solid #8b796b;outline-offset:2px
}
@media(max-width:700px){
  body[data-account-page] .ksa-loyalty-value,
  body[data-account-page] .ksa-loyalty-cta{font-size:14px}
  body[data-account-page] .ksa-loyalty-cta{width:100%;min-height:46px}
}

/* Stage 3: login/registration is a full account page on small screens, not a modal. */
@media (max-width: 700px) {
  body[data-account-page].ksa-is-guest .ksa-hero { display: none; }
  body[data-account-page].ksa-is-guest .ksa-breadcrumbs { display: none; }
  body[data-account-page].ksa-is-guest .ksa-page { padding-top: 10px; }
  body[data-account-page].ksa-is-guest .ksa-auth {
    margin-top: 0;
    grid-template-columns: minmax(0, 1fr);
    border-radius: 15px;
  }
  body[data-account-page].ksa-is-guest .ksa-auth__visual { display: none; }
  body[data-account-page].ksa-is-guest .ksa-auth__box {
    padding: 16px 13px 20px;
    min-width: 0;
  }
  body[data-account-page].ksa-is-guest .ksa-auth__tabs button {
    min-height: 48px;
  }
  body[data-account-page].ksa-is-guest .ksa-auth__form {
    min-width: 0;
  }
  body[data-account-page].ksa-is-guest .ksa-auth .ks-field input {
    min-height: 50px;
    font-size: 16px;
  }
}

/* Stage 9 — editable account avatar and account-only display theme. */
body[data-account-page] .ksa-avatar-wrap{isolation:isolate}
body[data-account-page] .ksa-avatar{overflow:hidden;color:#553846}
body[data-account-page] .ksa-avatar-photo{display:block;position:absolute;inset:0;width:100%;height:100%;border-radius:50%;object-fit:cover;border:2px solid rgba(255,255,255,.9);background:#fff}
body[data-account-page] .ksa-avatar-photo[hidden],body[data-account-page] .ksa-avatar[hidden]{display:none!important}
body[data-account-page][data-account-avatar-tone=sage] .ksa-avatar,body[data-account-page][data-account-avatar-tone=sage] .ksa-avatar-editor__preview{background:linear-gradient(135deg,#c5decb,#e9f0dc);color:#335443}
body[data-account-page][data-account-avatar-tone=slate] .ksa-avatar,body[data-account-page][data-account-avatar-tone=slate] .ksa-avatar-editor__preview{background:linear-gradient(135deg,#ced7e4,#e9eaf0);color:#394658}
body[data-account-page][data-account-avatar-tone=amber] .ksa-avatar,body[data-account-page][data-account-avatar-tone=amber] .ksa-avatar-editor__preview{background:linear-gradient(135deg,#ead4ac,#f5ead7);color:#795537}
body[data-account-page] .ksa-personalize{margin-top:10px;padding:clamp(18px,2.5vw,27px);border:1px solid #e2d9d2;border-radius:16px;background:#fff;color:#2e2925;scroll-margin-top:110px}
body[data-account-page] .ksa-personalize__intro{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:20px}
body[data-account-page] .ksa-personalize__intro h2{font:normal clamp(24px,2.5vw,33px)/1.2 Georgia,serif;letter-spacing:-.03em;margin:4px 0 7px}
body[data-account-page] .ksa-personalize__intro p,body[data-account-page] .ksa-personalize__section p{color:#756c64;line-height:1.6;font-size:13px;margin:0}
body[data-account-page] .ksa-personalize__privacy{flex:0 0 auto;font-size:11px;border:1px solid #dbe5d6;padding:7px 11px;border-radius:50px;background:#edf4ea;color:#466344;font-weight:750}
body[data-account-page] .ksa-personalize__grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
body[data-account-page] .ksa-personalize__section{border:1px solid #eae1db;border-radius:13px;padding:clamp(16px,2vw,23px);background:#f9f6f3;min-width:0}
body[data-account-page] .ksa-personalize__section h3{margin:0 0 7px;font-size:18px;font-weight:750;line-height:1.25}
body[data-account-page] .ksa-avatar-editor{display:flex;align-items:center;gap:16px;margin-top:17px;min-width:0}
body[data-account-page] .ksa-avatar-editor__preview{flex:0 0 76px;width:76px;height:76px;border-radius:50%;position:relative;display:grid;place-items:center;overflow:hidden;background:linear-gradient(145deg,#f4dfe5,#f1e9e4);font:normal 26px Georgia,serif;color:#553846}
body[data-account-page] .ksa-avatar-editor__preview img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
body[data-account-page] .ksa-avatar-editor__preview [hidden]{display:none!important}
body[data-account-page] .ksa-avatar-editor__buttons{min-width:0;display:flex;align-items:flex-start;flex-direction:column;gap:8px}
body[data-account-page] .ksa-avatar-upload,body[data-account-page] .ksa-avatar-remove{border:1px solid #ccbeb2;background:#fff;color:#41332e;padding:10px 14px;min-height:43px;border-radius:9px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;font-size:13px;font-weight:750;line-height:1.25}
body[data-account-page] .ksa-avatar-upload{position:relative;overflow:hidden}
body[data-account-page] .ksa-avatar-upload input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%}
body[data-account-page] .ksa-avatar-upload:focus-within{outline:3px solid #8a6859;outline-offset:2px}
body[data-account-page] .ksa-avatar-remove{background:transparent;border:0;min-height:30px;padding:4px 1px;color:#876052}
body[data-account-page] .ksa-avatar-remove[hidden]{display:none!important}
body[data-account-page] .ksa-option-title{display:block;font-size:12px;color:#6c5f55;font-weight:700;margin-top:16px;margin-bottom:9px}
body[data-account-page] .ksa-tone-options{display:flex;gap:11px;flex-wrap:wrap;align-items:center}
body[data-account-page] .ksa-tone{width:36px;height:36px;border-radius:50%;border:3px solid #fff;cursor:pointer;box-shadow:0 0 0 1px #d6ccc4;position:relative}
body[data-account-page] .ksa-tone--rose{background:#efc8d2}body[data-account-page] .ksa-tone--sage{background:#bcd7bc}body[data-account-page] .ksa-tone--slate{background:#bbc9d9}body[data-account-page] .ksa-tone--amber{background:#dfc189}
body[data-account-page] .ksa-tone[aria-pressed=true]{box-shadow:0 0 0 2px #554239}
body[data-account-page] .ksa-tone[aria-pressed=true]::after{content:"✓";position:absolute;inset:0;display:grid;place-items:center;font-size:18px;color:#302b26;font-weight:800}
body[data-account-page] .ksa-theme-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-top:16px}
body[data-account-page] .ksa-theme-options button{display:flex;align-items:center;justify-content:center;gap:6px;flex-wrap:wrap;min-height:53px;padding:10px 8px;border:1px solid #e3d8cf;border-radius:9px;background:#fff;color:#4b3e34;font-size:13px;font-weight:750;cursor:pointer}
body[data-account-page] .ksa-theme-options button span{font-size:17px}
body[data-account-page] .ksa-theme-options button[aria-pressed=true]{background:#3b302c;color:#fff;border-color:#3b302c}
body[data-account-page] .ksa-theme-note{margin-top:18px!important}
body[data-account-page] .ksa-personalize__status{font-size:13px;line-height:1.55;color:#437254;margin:12px 0 0;min-height:0}
body[data-account-page] .ksa-personalize__status:empty{display:none}
body[data-account-page] .ksa-personalize__status.is-error{color:#ae4239}
body[data-account-page] .ksa-dashboard-nav a{font-size:13px}
body[data-account-page] .ksa-profile-contacts b{font-size:13px}
body[data-account-page] .ksa-tone:focus-visible,body[data-account-page] .ksa-theme-options button:focus-visible,body[data-account-page] .ksa-avatar-remove:focus-visible{outline:3px solid #8a6859;outline-offset:3px}
body[data-account-page] .ksa-tone:disabled,body[data-account-page] .ksa-theme-options button:disabled,body[data-account-page] .ksa-avatar-remove:disabled{opacity:.5;cursor:wait}
@media(max-width:820px){body[data-account-page] .ksa-personalize__grid{grid-template-columns:1fr}}
@media(max-width:570px){body[data-account-page] .ksa-personalize{padding:16px;margin-top:9px}body[data-account-page] .ksa-personalize__intro{align-items:flex-start;flex-direction:column;gap:10px}body[data-account-page] .ksa-personalize__privacy{font-size:11px}body[data-account-page] .ksa-personalize__section{padding:16px}body[data-account-page] .ksa-theme-options{grid-template-columns:1fr}body[data-account-page] .ksa-theme-options button{min-height:44px;justify-content:flex-start;padding:10px 14px}body[data-account-page] .ksa-avatar-editor{gap:11px}body[data-account-page] .ksa-avatar-editor__preview{width:64px;height:64px;flex-basis:64px}}
/* Dark mode only within the personal account, never checkout or the storefront. */
body[data-account-page][data-account-theme=dark] .ksa-page{--ksa-ink:#f4eee8;--ksa-muted:#b7aaa0;--ksa-line:#514d49;--ksa-soft:#302f2d;background:#202221;color:#f4eee8;border-radius:18px}
body[data-account-page][data-account-theme=dark] .ksa-breadcrumbs,body[data-account-page][data-account-theme=dark] .ksa-breadcrumbs a{color:#dbcdc3}
body[data-account-page][data-account-theme=dark] .ksa-dashboard{color:#f3eee9}
body[data-account-page][data-account-theme=dark] :is(.ksa-dashboard-nav,.ksa-profile-card,.ksa-personalize,.ksa-stat,.ksa-orders-panel,.ksa-useful,.ksa-data-panel,.ksa-address-card,.ksa-order-card,.ksa-loyalty,.ksa-loyalty-balance,.ksa-loyalty-benefits,.ksa-loyalty-history,.ksa-referrals,.ksa-referrals-heading,.ksa-referrals-bottom,.ksa-telegram-preferences){background:#302e2d!important;color:#f3eee9!important;border-color:#57514e!important}
body[data-account-page][data-account-theme=dark] :is(.ksa-personalize__section,.ksa-useful-item,.ksa-linked-list,.ksa-address-empty,.ksa-empty-order,.ksa-loyalty-benefit,.ksa-loyalty-history-item,.ksa-referrals-terms,.ksa-referrals-list){background:#393634!important;color:#f1eae4!important;border-color:#57514e!important}
body[data-account-page][data-account-theme=dark] .ksa-dashboard :is(h2,h3,strong,b,.ksa-stat strong,.ksa-order-card__head,.ksa-avatar-editor__buttons label){color:#f3eee9}
body[data-account-page][data-account-theme=dark] .ksa-dashboard :is(p,small,.ksa-profile-contacts span,.ksa-profile-contacts b,.ksa-option-title,.ksa-eyebrow,.ksa-stat span,.ksa-stat small,.ksa-personalize__intro p,.ksa-personalize__section p,.ksa-personalize__section .ksa-theme-note){color:#c7bbb2}
body[data-account-page][data-account-theme=dark] .ksa-dashboard :is(a,.ksa-inline-action){color:#e9d0c0}
body[data-account-page][data-account-theme=dark] .ksa-dashboard-nav a:hover{background:#51453e!important;color:#fff}
body[data-account-page][data-account-theme=dark] .ksa-theme-options button{background:#48413d;color:#f6f1eb;border-color:#63574e}
body[data-account-page][data-account-theme=dark] .ksa-theme-options button[aria-pressed=true]{background:#e3c6b6;color:#2c2520;border-color:#e3c6b6}
body[data-account-page][data-account-theme=dark] .ksa-avatar-upload{background:#514843;color:#fff;border-color:#78685c}
body[data-account-page][data-account-theme=dark] .ksa-avatar-remove{color:#ecc6b7}
body[data-account-page][data-account-theme=dark] .ksa-personalize__privacy{background:#334b3a;color:#d7f0db;border-color:#46634b}
body[data-account-page][data-account-theme=dark] .ksa-profile-card__actions .ksa-btn.secondary{background:#4b4541;color:#fff;border-color:#73665d}
body[data-account-page][data-account-theme=dark] .ksa-profile-card__actions .ksa-btn.logout{color:#f4ddd7}
body[data-account-page][data-account-theme=dark] .ksa-personalize__status.is-error{color:#ffb3a4}
body[data-account-page][data-account-theme=dark] .ksa-personalize__status.is-success{color:#bde6bf}
body[data-account-page][data-account-theme=dark] :is(.ksa-order-card a,.ksa-stat i,.ksa-loyalty-cta){color:#e8d3c4}

/* The profile/address dialogs follow the selected account theme. */
body[data-account-page][data-account-theme=dark] :is(.ksa-dialog__card,.ksa-loyalty-dialog__card){background:#302e2d!important;color:#f2ece6!important;border-color:#605851!important}
body[data-account-page][data-account-theme=dark] :is(.ksa-dialog__card,.ksa-loyalty-dialog__card) :is(h2,h3,label,strong){color:#f3ebe4!important}
body[data-account-page][data-account-theme=dark] :is(.ksa-dialog__card,.ksa-loyalty-dialog__card) :is(p,small){color:#c7bbb2!important}
body[data-account-page][data-account-theme=dark] .ksa-dialog__card :is(input,select,textarea){background:#413d39!important;border-color:#6b5e54!important;color:#f8f0e9!important}
body[data-account-page][data-account-theme=dark] .ksa-dialog__card :is(input,textarea)::placeholder{color:#b9aca1!important}
body[data-account-page][data-account-theme=dark] .ksa-dialog__close{color:#f3eee9;background:#48413b;border-color:#6b5e54}
body[data-account-page][data-account-theme=dark] .ksa-dashboard :is(.ksa-useful-item,.ksa-order-card,.ksa-address-card) a:focus-visible{outline:3px solid #dbb9a8;outline-offset:2px}

/* 2026-10-25 · One-time birthday field v26 */
body[data-account-page] .ksa-birthday-field input:disabled{
  opacity:1;
  color:#554b55;
  -webkit-text-fill-color:#554b55;
  background:#f5f2f4;
  border-color:#ded5db;
  cursor:not-allowed;
}
body[data-account-page] .ksa-birthday-field small{
  display:block;
  margin-top:6px;
  color:#796b76;
  font-size:12px;
  line-height:1.5;
}


/* Account orders: immediate status / amount / action, including mobile. */
body[data-account-page].ksa-is-signed-in .ksa-hero{display:none}
body[data-account-page].ksa-is-signed-in .ksa-breadcrumbs{margin-bottom:8px}
body[data-account-page].ksa-is-signed-in .ksa-dashboard{margin-top:0}
.ksa-order-card{padding:14px;border:1px solid #e3ddd7;border-radius:12px;background:#fdfcfb}
.ksa-order-card__head{align-items:start;gap:10px}
.ksa-order-card__head h3{font-size:14px;line-height:1.45;font-weight:750;overflow-wrap:anywhere}
.ksa-order-card__head>strong{font-size:19px;font-weight:750;line-height:1.35;white-space:nowrap}
.ksa-order-card__head small{font-size:12px}
.ksa-order-card__badges{gap:6px;margin-top:8px}
.ksa-order-card__badges span{font-size:11px;font-weight:750;padding:5px 9px}
.ksa-order-card__badges .ksa-order-card__payment{background:#fff0dc;color:#704c26}
.ksa-order-card__badges .ksa-order-card__payment.is-paid{background:#e4f2e6;color:#346141}
.ksa-order-card__summary,.ksa-order-card__delivery{
  margin:8px 0 0;color:#635a54;font-size:13px;line-height:1.45;overflow-wrap:anywhere
}
.ksa-order-card__delivery{margin-top:3px;color:#786d64;font-size:12px}
.ksa-order-card__actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:11px}
.ksa-order-card__action{
  display:inline-flex;align-items:center;justify-content:center;min-height:43px;
  padding:9px 13px;border:1px solid #d9d0c9;border-radius:9px;background:#fff;
  color:#3b3531;font:750 12px/1.25 Arial,sans-serif;text-align:center;text-decoration:none
}
.ksa-order-card__action.is-primary{background:#292723;border-color:#292723;color:#fff}
.ksa-order-card__action:hover{background:#f3efea}
.ksa-order-card__action.is-primary:hover{background:#494139}
.ksa-order-card__action:focus-visible{outline:3px solid #8eaf94;outline-offset:2px}
.ksa-personalize{scroll-margin-top:88px}
body[data-account-page][data-account-theme=dark] .ksa-order-card__action{background:#49433f;color:#f5eee9;border-color:#6e6058}
body[data-account-page][data-account-theme=dark] .ksa-order-card__action.is-primary{background:#d8c6b4;color:#211e1b}
body[data-account-page][data-account-theme=dark] .ksa-order-card__summary,
body[data-account-page][data-account-theme=dark] .ksa-order-card__delivery{color:#d0c3b9}
body[data-account-page][data-account-theme=dark] .ksa-order-card__badges .ksa-order-card__payment{background:#564431;color:#f7dfbc}
body[data-account-page][data-account-theme=dark] .ksa-order-card__badges .ksa-order-card__payment.is-paid{background:#2d4839;color:#d7f4e0}
@media(max-width:720px){
  body[data-account-page].ksa-is-signed-in .ksa-breadcrumbs{display:none}
  body[data-account-page].ksa-is-signed-in .ksa-dashboard-nav{margin-top:3px}
  .ksa-orders-panel{padding:12px}
  .ksa-orders-panel .ksa-section-head h2{font-size:23px}
  .ksa-orders-panel .ksa-section-head p{font-size:12px}
  .ksa-order-card{padding:12px}
  .ksa-order-card__head h3{font-size:12px}
  .ksa-order-card__head>strong{font-size:16px}
  .ksa-order-card__actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  .ksa-order-card__action{min-height:46px;padding:8px 10px}
  .ksa-order-card__action.is-primary{grid-column:1/-1}
}
@media(max-width:380px){
  .ksa-order-card__head{flex-wrap:wrap}
  .ksa-order-card__actions{grid-template-columns:1fr}
  .ksa-order-card__action.is-primary{grid-column:auto}
}


/* ---- v02: two guest routes (Telegram / phone-only) ---- */
.ksa-auth__quick{display:grid;gap:10px;margin:0 0 18px}
.ksa-auth__quick-btn{display:flex;align-items:center;gap:12px;width:100%;min-height:56px;padding:12px 16px;border:1px solid var(--ksa-line,#d9d4cc);border-radius:14px;background:var(--account-surface,#fff);color:var(--ksa-ink,#1b1b1b);font:inherit;text-align:left;text-decoration:none;cursor:pointer;transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease}
.ksa-auth__quick-btn svg{width:24px;height:24px;flex:none}
.ksa-auth__quick-btn span{display:grid;gap:2px;min-width:0}
.ksa-auth__quick-btn strong{font-size:15px;line-height:1.25;font-weight:700}
.ksa-auth__quick-btn small{font-size:12px;line-height:1.35;opacity:.74}
.ksa-auth__quick-btn:hover{transform:translateY(-1px);box-shadow:0 8px 20px rgba(20,20,20,.08)}
.ksa-auth__quick-btn:focus-visible{outline:3px solid rgba(34,158,217,.45);outline-offset:2px}
.ksa-auth__quick-btn.is-telegram{background:#229ED9;border-color:#229ED9;color:#fff}
.ksa-auth__quick .ks-checkout-status:empty{display:none}
.ksa-auth__quick-note{margin:0;font-size:12px;line-height:1.45;color:var(--ksa-muted,#6f6b64)}
.ksa-auth__later{margin:12px 0 0;font-size:12px;line-height:1.45;color:var(--ksa-muted,#6f6b64)}
body[data-account-page][data-account-theme=dark] .ksa-auth__quick-btn{background:var(--account-inset,#313538);border-color:var(--account-stroke,#45494c);color:var(--account-text,#f3f1ed)}
body[data-account-page][data-account-theme=dark] .ksa-auth__quick-btn.is-telegram{background:#229ED9;border-color:#229ED9;color:#fff}
@media(max-width:520px){
  .ksa-auth__quick-btn{min-height:52px;padding:11px 13px;gap:10px}
  .ksa-auth__quick-btn strong{font-size:14px}
  .ksa-auth__quick-note{font-size:11.5px}
}


/* ---- v02: optional password + studio credit ---- */
.ksa-security-card{margin:18px 0;padding:18px;border:1px solid var(--ksa-line,#e3ded6);border-radius:18px;background:var(--account-surface,#fff);color:var(--ksa-ink,#1b1b1b)}
.ksa-security-card__head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin:0 0 8px}
.ksa-security-card__head h3{margin:2px 0 0;font-size:18px;line-height:1.3}
.ksa-security-card__badge{flex:none;padding:4px 9px;border-radius:999px;background:rgba(34,158,217,.12);color:#167ba8;font-size:11px;font-weight:700;letter-spacing:.02em;text-transform:uppercase}
.ksa-security-card>p{margin:0 0 12px;font-size:13px;line-height:1.5;color:var(--ksa-muted,#6f6b64)}
.ksa-security-card__form{display:grid;gap:10px;max-width:420px}
.ksa-security-card__form .ksa-btn{min-height:46px}
.ksa-security-card__note{margin:10px 0 0!important;font-size:12px!important}
.ks2-footer-credit{color:inherit;text-decoration:none;border-bottom:1px solid currentColor;opacity:.9}
.ks2-footer-credit:hover,.ks2-footer-credit:focus-visible{opacity:1}
body[data-account-page][data-account-theme=dark] .ksa-security-card{background:var(--account-surface,#282b2e);border-color:var(--account-stroke,#45494c);color:var(--account-text,#f3f1ed)}
body[data-account-page][data-account-theme=dark] .ksa-security-card__badge{background:rgba(34,158,217,.18);color:#9ad9f7}
@media(max-width:520px){
  .ksa-security-card{margin:14px 0;padding:14px;border-radius:16px}
  .ksa-security-card__head h3{font-size:16px}
  .ksa-security-card__form .ksa-btn{min-height:48px}
}
/* Touch targets: keep compact controls visually small but tappable on phones. */
body[data-account-page] .ksa-tone{width:44px;height:44px;min-width:44px;min-height:44px}
body[data-account-page] .ksa-loyalty-history-filters button,
body[data-account-page] .ksa-tg-settings__refresh{min-height:44px}
/* Header parity with the storefront. Keep the account header visually identical
   to the homepage: same ink, logo metrics, nav height/gap and search button. */
body[data-account-page] .ks2-header{color:var(--ks-ink,#1f1f1e)}
body[data-account-page] .ks2-logo{font-size:25px;letter-spacing:-.055em}
body[data-account-page] .ks2-nav{height:42px;gap:23px}
body[data-account-page] .ks2-search button{min-width:0;min-height:0}
@media(min-width:768px) and (max-width:1180px){
  body[data-account-page] .ks2-header-main{padding-top:12px;padding-bottom:12px}
}
@media(max-width:767px){
  body[data-account-page] .ks2-logo{font-size:20px}
}
@media(max-width:430px){
  body[data-account-page] .ks2-logo{font-size:18px}
}
