:root {
  --ks-bg: #f6f3ec;
  --ks-card: #fffcf8;
  --ks-ink: #1c1915;
  --ks-muted: #6d675c;
  --ks-line: rgba(28, 25, 21, 0.08);
  --ks-gold: #c6a15b;
  --ks-gold-ink: #241c10;
  --ks-price: #6e5424;
  --ks-up: #1f7a4d;
  --ks-up-bg: rgba(31, 122, 77, 0.1);
  --ks-down: #9d3b3b;
  --ks-down-bg: rgba(157, 59, 59, 0.1);
  --ks-wait: #8a5a12;
  --ks-wait-bg: rgba(138, 90, 18, 0.12);
  --ks-shadow: 0 12px 32px rgba(28, 25, 21, 0.06);
  --ks-radius: 22px;
  --ks-radius-sm: 14px;
  --ks-header: 56px;
  --ks-tabbar: 64px;
  --ks-side: 252px;
  --ks-ease: cubic-bezier(0.2, 0, 0, 1);
  color-scheme: light;
}

html.ks-dark {
  --ks-bg: #101114;
  --ks-card: #1c1e24;
  --ks-ink: #f6f1e8;
  --ks-muted: #b7b1a6;
  --ks-line: rgba(246, 241, 232, 0.1);
  --ks-price: #f0d7a2;
  --ks-up: #8fd4b0;
  --ks-up-bg: rgba(143, 212, 176, 0.12);
  --ks-down: #f0b4b4;
  --ks-down-bg: rgba(240, 180, 180, 0.12);
  --ks-wait: #e4c98a;
  --ks-wait-bg: rgba(228, 201, 138, 0.12);
  --ks-shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body.ks-body {
  margin: 0;
  background: var(--ks-bg);
  color: var(--ks-ink);
  font-family: "Cairo", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

body.ks-body { min-height: 100vh; }

img { max-width: 100%; display: block; }

button, input, select, textarea { font: inherit; color: inherit; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, p { margin: 0; }

.ks-skip {
  position: absolute;
  inset-inline-start: 12px;
  top: -48px;
  z-index: 80;
  background: var(--ks-gold);
  color: var(--ks-gold-ink);
  padding: 8px 12px;
  border-radius: 999px;
}

.ks-skip:focus { top: 12px; }

.ks-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 46;
  display: grid;
  grid-template-areas: "menu brand tools";
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  height: calc(var(--ks-header) + env(safe-area-inset-top));
  padding: calc(8px + env(safe-area-inset-top)) 12px 8px;
  background: var(--ks-card);
  border-bottom: 1px solid var(--ks-line);
}

.ks-brand {
  grid-area: brand;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 40px;
}

.ks-mark {
  display: inline-grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 12px;
  background: #f6f3ec;
}

.ks-mark img { width: 100%; height: 100%; object-fit: contain; }

.ks-mark-night { display: none; }

html.ks-dark .ks-mark { background: #101114; }
html.ks-dark .ks-mark-day { display: none; }
html.ks-dark .ks-mark-night { display: block; }

.ks-word {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  line-height: 1;
}

.ks-word-en {
  font-family: "Times New Roman", Times, serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ks-price);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ks-word-line { height: 2px; width: 100%; border-radius: 999px; background: var(--ks-gold); }

.ks-tools {
  grid-area: tools;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.ks-header-search { display: none; }

.ks-search { position: relative; min-width: 0; }

.ks-home-search, .ks-page-search { margin-bottom: 12px; }

.ks-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  flex: 0 0 auto;
  border: 1px solid var(--ks-line);
  border-radius: 999px;
  background: var(--ks-bg);
  color: var(--ks-ink);
}

.ks-search-btn svg { width: 20px; height: 20px; }

.ks-search input {
  width: 100%;
  height: 40px;
  border: 1px solid var(--ks-line);
  background: var(--ks-bg);
  border-radius: 999px;
  padding-inline: 14px 38px;
  font-size: 14px;
}

.ks-search svg {
  position: absolute;
  inset-inline-end: 12px;
  top: 10px;
  width: 20px;
  height: 20px;
  color: var(--ks-muted);
}

.ks-icon-btn, .ks-theme button, .ks-avatar, .ks-login {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: transparent;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}

.ks-menu-btn {
  grid-area: menu;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  flex: 0 0 auto;
  border: 1px solid var(--ks-line);
  background: var(--ks-bg);
  color: var(--ks-ink);
}

.ks-menu-btn[aria-expanded="true"] {
  background: rgba(198, 161, 91, 0.18);
  color: var(--ks-price);
  border-color: transparent;
}

.ks-side-theme {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  padding: 8px 10px;
  border-radius: 16px;
  background: var(--ks-bg);
}

.ks-side-theme > span { font-size: 14px; font-weight: 700; }

.ks-theme {
  display: flex;
  flex: 0 0 auto;
  padding: 3px;
  border-radius: 999px;
  background: var(--ks-card);
  border: 1px solid var(--ks-line);
}

.ks-header-theme {
  background: var(--ks-bg);
}

.ks-theme button { width: 32px; min-width: 32px; height: 32px; min-height: 32px; color: var(--ks-muted); }

.ks-theme button[aria-pressed="true"] {
  background: var(--ks-bg);
  color: var(--ks-ink);
  box-shadow: var(--ks-shadow);
}

.ks-header-theme { display: none; }

.ks-header-theme button[aria-pressed="true"] {
  background: var(--ks-card);
}

.ks-theme svg, .ks-icon-btn svg, .ks-tab svg, .ks-link svg { width: 20px; height: 20px; }

.ks-avatar, .ks-login {
  width: 40px;
  height: 40px;
  padding: 0;
  background: var(--ks-bg);
  color: var(--ks-ink);
  border: 1px solid var(--ks-line);
  font-weight: 700;
}

.ks-avatar svg, .ks-login svg { width: 20px; height: 20px; }

.ks-balance-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  max-width: 132px;
  padding-inline: 10px;
  border-radius: 999px;
  border: 1px solid var(--ks-line);
  background: var(--ks-bg);
  color: var(--ks-ink);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
}

.ks-balance-chip span {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding-inline: 7px;
  border-radius: 999px;
  background: var(--ks-gold);
  color: var(--ks-gold-ink);
  font-size: 11px;
}

.ks-balance-chip.is-guest {
  background: var(--ks-gold);
  color: var(--ks-gold-ink);
  border-color: transparent;
}

@media (max-width: 359px) {
  .ks-word { display: none; }
  .ks-header { padding-inline: 10px; gap: 6px; }
  .ks-balance-chip { max-width: 108px; padding-inline: 8px; font-size: 12px; }
  .ks-balance-chip span { display: none; }
}

.ks-scrim {
  position: fixed;
  inset: 0;
  z-index: 44;
  border: 0;
  background: rgba(16, 17, 20, 0.46);
  opacity: 0;
  pointer-events: none;
}

html.ks-nav-open .ks-scrim { opacity: 1; pointer-events: auto; }

.ks-side {
  position: fixed;
  z-index: 45;
  inset-block: 0;
  inset-inline-start: 0;
  width: min(var(--ks-side), 84vw);
  background: var(--ks-card);
  border-inline-end: 1px solid var(--ks-line);
  transform: translateX(100%);
  display: flex;
  flex-direction: column;
  padding: calc(var(--ks-header) + env(safe-area-inset-top) + 4px) 12px calc(16px + env(safe-area-inset-bottom));
  overflow: auto;
}

html.ks-nav-open .ks-side { transform: none; }

@media (max-width: 1023px) {
  .ks-side { transition: transform 0.28s var(--ks-ease); }
  .ks-scrim { transition: opacity 0.28s var(--ks-ease); }
}

.ks-group { margin-bottom: 16px; }

.ks-group-label {
  color: var(--ks-muted);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 10px;
}

.ks-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 14px;
  color: var(--ks-ink);
}
.ks-link-app {
  margin-top: 4px;
  background: rgba(198, 161, 91, 0.16);
  color: var(--ks-price);
  font-weight: 700;
}

.ks-link.is-active { background: rgba(198, 161, 91, 0.14); color: var(--ks-price); }

.ks-side-card {
  margin-top: auto;
  padding: 12px;
  border-radius: 18px;
  background: var(--ks-bg);
}

.ks-side-card strong, .ks-side-card span { display: block; }

.ks-side-card span { color: var(--ks-muted); font-size: 13px; }

.ks-logout, .ks-side-actions { display: flex; gap: 8px; margin-top: 12px; }

.ks-logout button {
  width: 100%;
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid var(--ks-line);
  background: transparent;
  cursor: pointer;
}

.ks-main {
  padding-top: calc(var(--ks-header) + env(safe-area-inset-top));
  padding-bottom: calc(var(--ks-tabbar) + env(safe-area-inset-bottom) + 24px);
}

.ks-page {
  width: min(1080px, calc(100% - 32px));
  margin-inline: auto;
  padding-block: 12px 8px;
}

.ks-tabs {
  position: fixed;
  z-index: 35;
  inset-inline: 0;
  bottom: 0;
  height: calc(var(--ks-tabbar) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--ks-card);
  border-top: 1px solid var(--ks-line);
}

.ks-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 44px;
  color: var(--ks-muted);
  font-size: 12px;
  font-weight: 600;
}

.ks-tab-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 64px;
  padding: 4px 8px;
  border-radius: 16px;
}

.ks-tab.is-active { color: var(--ks-price); }
.ks-tab.is-active .ks-tab-pill {
  background: rgba(198, 161, 91, 0.16);
}
.ks-tab.is-active .ks-tab-pill::after {
  content: "";
  width: 16px;
  height: 2px;
  border-radius: 99px;
  background: var(--ks-gold);
}

.ks-dock {
  display: none;
  position: fixed;
  z-index: 34;
  inset-inline: 12px;
  bottom: calc(var(--ks-tabbar) + env(safe-area-inset-bottom) + 8px);
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--ks-card);
  border: 1px solid var(--ks-line);
  border-radius: 18px;
  box-shadow: var(--ks-shadow);
}

body.ks-home .ks-dock { display: none; }

.ks-dock-balance { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ks-dock .ks-btn { flex: 0 0 auto; }
.ks-dock-ico {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--ks-ink);
}
.ks-dock-ico svg { width: 20px; height: 20px; }
.ks-dock p { color: var(--ks-muted); font-size: 12px; }
.ks-dock strong { display: block; font-size: 14px; font-variant-numeric: tabular-nums; }

.ks-section { margin-top: 14px; }

.ks-section h2 { font-size: 14px; font-weight: 700; margin-bottom: 8px; }

.ks-count { color: var(--ks-muted); font-size: 13px; margin-bottom: 8px; }

.ks-stage { position: relative; }

.ks-slide {
  height: 144px;
  border-radius: var(--ks-radius);
  overflow: hidden;
  background: var(--ks-card);
  border: 1px solid var(--ks-line);
}

.ks-slide img {
  width: 100%;
  height: 144px;
  object-fit: cover;
  object-position: center;
}

.ks-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
}

.ks-dots button {
  width: 5px;
  height: 5px;
  border: 0;
  border-radius: 99px;
  background: rgba(28, 25, 21, 0.2);
  padding: 0;
}

html.ks-dark .ks-dots button { background: rgba(246, 241, 232, 0.28); }

.ks-dots button.is-on { width: 16px; height: 5px; background: var(--ks-gold); }

.ks-rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.ks-rail::-webkit-scrollbar { display: none; }

.ks-cat {
  flex: 0 0 84px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
}

.ks-cat-img, .ks-ph {
  width: 64px;
  height: 64px;
  margin: 0 auto 6px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--ks-card);
  border: 1px solid var(--ks-line);
  display: grid;
  place-items: center;
}

.ks-cat-img img, .ks-ph img { width: 100%; height: 100%; object-fit: cover; }

.ks-cat b {
  display: block;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ks-shortcuts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  background: var(--ks-card);
  border: 1px solid var(--ks-line);
  border-radius: var(--ks-radius);
  overflow: hidden;
}
.ks-shortcut {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 6px;
  min-height: 78px;
  padding: 12px 4px;
  border: 0;
  border-inline-start: 1px solid var(--ks-line);
  border-radius: 0;
  background: transparent;
  text-align: center;
}
.ks-shortcuts .ks-shortcut:first-child { border-inline-start: 0; }
.ks-shortcut:active { background: rgba(198, 161, 91, 0.08); }
.ks-home .ks-section { margin-top: 16px; }
.ks-home-title {
  display: flex;
  justify-content: flex-start;
  margin: 0 0 8px;
  color: var(--ks-ink);
  font-family: "Cairo", sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  text-align: start;
}
.ks-home-title span {
  display: inline-grid;
  justify-items: stretch;
  gap: 3px;
  animation: ks-title-in 0.7s var(--ks-ease) both;
}
.ks-home-title span::after {
  content: "";
  height: 2px;
  border-radius: 99px;
  background: var(--ks-gold);
  transform-origin: right center;
  animation: ks-line-draw 0.75s var(--ks-ease) 0.08s both;
}
@keyframes ks-title-in {
  from { opacity: 0; transform: translateX(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes ks-line-draw {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
@supports (animation-timeline: view()) {
  .ks-home-title span,
  .ks-home-title span::after {
    animation-duration: auto;
    animation-timing-function: linear;
    animation-delay: 0s;
    animation-timeline: view();
    animation-range: entry 0% entry 55%;
  }
}
.ks-home .ks-grid,
.ks-grid.ks-catalog {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.ks-home .ks-tile,
.ks-catalog .ks-tile { border-radius: 14px; box-shadow: none; }
.ks-home .ks-tile-media,
.ks-catalog .ks-tile-media { aspect-ratio: 1; }
.ks-home .ks-tile-body,
.ks-catalog .ks-tile-body { align-items: center; justify-content: center; min-height: 0; padding: 6px 4px 8px; }
.ks-catalog .ks-tile-copy { justify-items: center; text-align: center; }
.ks-home .ks-tile-name,
.ks-catalog .ks-tile-name { font-size: 11px; text-align: center; }
.ks-catalog .ks-price,
.ks-catalog .ks-muted { font-size: 11px; }
.ks-shortcut span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(198, 161, 91, 0.14);
  color: var(--ks-price);
}
.ks-shortcut svg { width: 18px; height: 18px; }
.ks-shortcut b {
  max-width: 100%;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.ks-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ks-section-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 12px;
  border-radius: 22px;
  background: var(--ks-card);
  border: 1px solid var(--ks-line);
  text-align: center;
}

.ks-section-card b { font-size: 14px; font-weight: 700; }
.ks-section-card small { color: var(--ks-muted); }

.ks-section-media {
  display: grid;
  place-items: center;
  aspect-ratio: 1.15;
  border-radius: 16px;
  overflow: hidden;
  background: var(--ks-bg);
}

.ks-section-media img { width: 100%; height: 100%; object-fit: cover; }
.ks-section-media .ks-mark { width: 64px; height: 64px; }

.ks-cats .ks-cat { flex: none; width: 100%; }
.ks-cats .ks-cat-img { width: min(88px, 100%); height: auto; aspect-ratio: 1; }

.ks-grid, .ks-cats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ks-tile {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  background: var(--ks-card);
  border: 1px solid var(--ks-line);
  border-radius: 18px;
  overflow: hidden;
}

.ks-tile-media {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1.45;
  overflow: hidden;
  background: var(--ks-bg);
}

.ks-tile-media > img { width: 100%; height: 100%; object-fit: cover; }
.ks-tile-media .ks-mark { width: 72px; height: 72px; }

.ks-tile.is-oos .ks-tile-media img { filter: grayscale(1); opacity: 0.72; }

.ks-tile-body {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px 10px;
}

.ks-tile-copy { min-width: 0; display: grid; gap: 2px; }

.ks-tile-go {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--ks-gold);
  color: var(--ks-gold-ink);
}

.ks-tile-go svg { width: 16px; height: 16px; }

.ks-tile-name {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ks-price { color: var(--ks-price); font-weight: 700; font-variant-numeric: tabular-nums; }

.ks-muted { color: var(--ks-muted); font-size: 13px; }

.ks-flag {
  position: absolute;
  inset-block-start: 8px;
  inset-inline-start: 8px;
  background: var(--ks-card);
  color: var(--ks-muted);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
}

.ks-card, .ks-note, .ks-empty, .ks-auth-card {
  background: var(--ks-card);
  border: 1px solid var(--ks-line);
  border-radius: var(--ks-radius);
  box-shadow: var(--ks-shadow);
}

.ks-card, .ks-note { padding: 16px; }

.ks-note { background: rgba(198, 161, 91, 0.08); }

.ks-stack { display: grid; gap: 12px; }

.ks-field { display: grid; gap: 6px; margin-bottom: 12px; }

.ks-field span, .ks-label { font-weight: 600; }

.ks-field input, .ks-field select, .ks-field textarea, .ks-input {
  width: 100%;
  height: 48px;
  border-radius: var(--ks-radius-sm);
  border: 1px solid var(--ks-line);
  background: var(--ks-bg);
  padding-inline: 14px;
  scroll-margin-bottom: 160px;
}

.ks-field textarea { height: auto; min-height: 96px; padding-block: 12px; }

.ks-control { position: relative; display: block; }

.ks-control svg {
  position: absolute;
  inset-inline-end: 14px;
  top: 50%;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  color: var(--ks-muted);
  pointer-events: none;
}

.ks-control input { padding-inline-end: 44px; }

.ks-error { color: var(--ks-down); font-size: 13px; margin-top: 4px; }

.ks-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.ks-chip, .ks-btn, .ks-btn-ghost {
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 700;
}

.ks-chip {
  padding: 8px 14px;
  background: transparent;
  border-color: var(--ks-line);
}

.ks-chip.is-on { border-color: var(--ks-gold); background: rgba(198, 161, 91, 0.12); color: var(--ks-price); }

.ks-btn, .ks-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  text-align: center;
}

.ks-btn { background: var(--ks-gold); color: var(--ks-gold-ink); width: 100%; }

.ks-btn[disabled] { opacity: 0.55; cursor: not-allowed; }

.ks-btn-ghost { background: transparent; border-color: var(--ks-line); color: var(--ks-ink); width: auto; }

.ks-btn-sm { width: auto; min-height: 40px; padding-inline: 14px; }

.ks-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-weight: 700;
}

.ks-total b { font-size: 18px; font-variant-numeric: tabular-nums; }

.ks-buybar {
  position: static;
  display: grid;
  gap: 8px;
  margin-top: 4px;
  padding: 14px;
  border: 1px solid rgba(198, 161, 91, 0.34);
  border-radius: 18px;
  background: rgba(198, 161, 91, 0.1);
}

.ks-buybar-sum {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 4px 12px;
  min-width: 0;
}

.ks-buybar-sum span {
  font-size: 13px;
  font-weight: 700;
  color: var(--ks-muted);
}

.ks-buybar-sum b {
  justify-self: end;
  font-size: 26px;
  line-height: 1;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ks-price);
}

.ks-buybar-sum b.is-live { animation: ks-price-live 0.22s var(--ks-ease); }

@keyframes ks-price-live {
  from { opacity: 0.35; }
  to { opacity: 1; }
}

.ks-buybar-sum small {
  grid-column: 1 / -1;
  font-size: 12px;
  font-weight: 600;
  color: var(--ks-muted);
}

.ks-buybar-sum small.is-short { color: var(--ks-down); }

.ks-buybar .ks-btn {
  width: 100%;
  max-width: none;
  min-height: 48px;
}

body.ks-home .ks-main { padding-bottom: calc(var(--ks-tabbar) + env(safe-area-inset-bottom) + 24px); }
body.ks-product .ks-tabs { display: none; }
body.ks-product .ks-main { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }

.ks-buy, .ks-buy-side, .ks-buy-main, .ks-buy-side > * { min-width: 0; max-width: 100%; }

.ks-buy { display: grid; gap: 10px; }

.ks-card.ks-buy-head {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
}

.ks-buy-media {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--ks-bg);
}

.ks-buy-media img,
.ks-buy-media .ks-mark {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: cover;
}

.ks-buy-media .ks-mark img { object-fit: contain; }

.ks-buy-copy { min-width: 0; display: grid; gap: 4px; }

.ks-buy-copy h1 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ks-buy-offer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.ks-buy-offer .ks-price { font-size: 17px; }
.ks-buy-offer .ks-muted { font-size: 12px; }

.ks-buy-note {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  padding: 8px 12px;
  border: 1px solid var(--ks-line);
  border-radius: 14px;
  background: rgba(198, 161, 91, 0.08);
  color: inherit;
  text-align: start;
  cursor: pointer;
}

.ks-buy-note span:first-child {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: var(--ks-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ks-buy-note span:last-child {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--ks-price);
}

.ks-buy-side { display: grid; align-content: start; }

.ks-buy-cta {
  padding: 14px;
  background: var(--ks-card);
  border: 1px solid var(--ks-line);
  border-radius: var(--ks-radius);
  box-shadow: var(--ks-shadow);
}

.ks-buy-cta .ks-buybar { margin-top: 0; padding-top: 0; border-top: 0; }

.ks-card.ks-buy-form {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.ks-buy-lead {
  margin: 0;
  color: var(--ks-muted);
  font-size: 13px;
  line-height: 1.6;
}

.ks-buy-block { display: grid; gap: 8px; }

.ks-buy-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}

.ks-buy-label .ks-muted {
  font-size: 12px;
  font-weight: 600;
}

.ks-buy-help {
  border: 0;
  padding: 0;
  background: none;
  color: var(--ks-price);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ks-buy-form .ks-field { margin: 0; }

.ks-id {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding-inline: 12px;
  border: 1px solid var(--ks-line);
  border-radius: 16px;
  background: var(--ks-bg);
}

.ks-id:focus-within,
.ks-buy-qty:focus-within {
  border-color: var(--ks-gold);
  box-shadow: 0 0 0 3px rgba(198, 161, 91, 0.2);
}

.ks-id-ico {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(198, 161, 91, 0.16);
  color: var(--ks-price);
}

.ks-id-ico svg { width: 18px; height: 18px; }

.ks-id input {
  flex: 1;
  min-width: 0;
  height: 48px;
  border: 0;
  outline: none;
  background: transparent;
  padding: 0;
  font-size: 16px;
}

.ks-buy-qty {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding-inline: 14px;
  border: 1px solid var(--ks-line);
  border-radius: 16px;
  background: var(--ks-bg);
}

.ks-buy-form .ks-buy-qty input {
  width: 100%;
  height: 48px;
  border: 0;
  outline: none;
  background: transparent;
  padding: 0;
  font-size: 18px;
  font-weight: 700;
  text-align: start;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
  appearance: textfield;
}

.ks-buy-qty input::-webkit-outer-spin-button,
.ks-buy-qty input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.ks-buy-sheet-copy {
  margin-top: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ks-done { display: grid; gap: 14px; }
.ks-done .ks-sheet-head h2 { font-size: 18px; }
.ks-done .ks-sheet-head h2::after {
  content: "";
  display: block;
  width: 28px;
  height: 2px;
  margin-top: 6px;
  border-radius: 99px;
  background: var(--ks-gold);
}
.ks-done-badge { justify-self: start; }
.ks-done-rows {
  display: grid;
  border: 1px solid var(--ks-line);
  border-radius: 16px;
  overflow: hidden;
}
.ks-done-rows div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 10px 14px;
  background: var(--ks-bg);
}
.ks-done-rows div + div { border-top: 1px solid var(--ks-line); }
.ks-done-rows span { color: var(--ks-muted); font-size: 13px; font-weight: 600; }
.ks-done-rows b { font-size: 16px; font-variant-numeric: tabular-nums; color: var(--ks-price); }
.ks-done-actions { display: grid; gap: 8px; }
.ks-done-actions .ks-btn,
.ks-done-actions .ks-btn-ghost { width: 100%; }

.ks-rule { width: 32px; height: 2px; border-radius: 99px; background: var(--ks-gold); }

.ks-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--ks-wait-bg);
  color: var(--ks-wait);
}

.ks-badge.is-ok { background: var(--ks-up-bg); color: var(--ks-up); }
.ks-badge.is-no { background: var(--ks-down-bg); color: var(--ks-down); }

.ks-list { display: grid; gap: 8px; }

.ks-row, .ks-order {
  width: 100%;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 10px;
  align-items: center;
  text-align: start;
  padding: 10px;
  border: 0;
  border-radius: 18px;
  background: var(--ks-card);
  box-shadow: var(--ks-shadow);
  cursor: pointer;
}

.ks-row img, .ks-order img, .ks-avatar-img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--ks-bg);
}

.ks-row b, .ks-order b { display: block; font-size: 14px; }

.ks-row small, .ks-order small { color: var(--ks-muted); }

.ks-account, .ks-orders { display: grid; gap: 14px; }
.ks-account .ks-home-title, .ks-orders .ks-home-title { margin: 0; }
.ks-account .ks-muted { margin: 0; }
.ks-account-card {
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 16px;
  background: var(--ks-card);
  border: 1px solid var(--ks-line);
  border-radius: var(--ks-radius);
}
.ks-account-id {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  margin-bottom: 4px;
}
.ks-account-avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(198, 161, 91, 0.14);
  color: var(--ks-price);
  font-weight: 700;
  font-size: 18px;
}
.ks-account-id b, .ks-account-id small { display: block; }
.ks-account-id b {
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ks-account-id small {
  color: var(--ks-muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ks-account-card > span { color: var(--ks-muted); font-size: 13px; font-weight: 600; }
.ks-account-card > strong {
  color: var(--ks-price);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.ks-account-card .ks-btn { margin-top: 4px; }
.ks-account .ks-btn-ghost { width: 100%; }
.ks-menu {
  display: grid;
  background: var(--ks-card);
  border: 1px solid var(--ks-line);
  border-radius: var(--ks-radius);
  overflow: hidden;
}
.ks-menu a {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 52px;
  padding: 8px 12px;
  border-top: 1px solid var(--ks-line);
}
.ks-menu a:first-child { border-top: 0; }
.ks-menu-ico {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(198, 161, 91, 0.14);
  color: var(--ks-price);
}
.ks-menu-ico svg { width: 18px; height: 18px; }
.ks-menu b { font-size: 14px; font-weight: 700; }
.ks-account-danger {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ks-down);
  font-weight: 700;
}
.ks-orders-find { display: grid; gap: 8px; }
.ks-orders .ks-segment {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.ks-orders .ks-choice {
  position: relative;
  justify-content: center;
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
}
.ks-orders .ks-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.ks-orders-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.ks-orders-bar .ks-field { margin: 0; }
.ks-orders-bar .ks-btn-ghost { height: 48px; padding-inline: 16px; }
.ks-order {
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--ks-line);
  border-radius: 16px;
  box-shadow: none;
}
.ks-order img, .ks-order .ks-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}
.ks-order-body { min-width: 0; display: grid; gap: 4px; }
.ks-order-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.ks-order-line b:first-child,
.ks-order-line small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ks-order-line .ks-price, .ks-order .ks-badge { flex: 0 0 auto; }
.ks-order-line .ks-price { font-size: 13px; }
html.ks-sheet-open { overflow: hidden; }

.ks-sheet-grab {
  width: 36px;
  height: 4px;
  margin: 2px auto 12px;
  border-radius: 99px;
  background: var(--ks-line);
}

.ks-order-sheet { display: grid; gap: 0; }

.ks-order-sheet .ks-sheet-head h2 {
  font-size: 16px;
  font-weight: 700;
}

.ks-order-sheet .ks-sheet-head h2::after {
  content: "";
  display: block;
  width: 28px;
  height: 2px;
  margin-top: 6px;
  border-radius: 99px;
  background: var(--ks-gold);
}

.ks-order-hero {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 14px;
}

.ks-order-media {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--ks-bg);
}

.ks-order-media img,
.ks-order-media .ks-mark {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  object-fit: cover;
}

.ks-order-media [hidden],
.ks-order-facts > div[hidden],
.ks-order-code[hidden] { display: none; }

.ks-order-identity { min-width: 0; display: grid; gap: 6px; }

.ks-order-identity h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.ks-order-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
}

.ks-order-meta .ks-price { font-size: 18px; }

.ks-order-facts {
  margin: 14px 0 0;
  padding: 2px 12px;
  border: 1px solid var(--ks-line);
  border-radius: 16px;
  background: var(--ks-bg);
}

.ks-order-facts > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  border-bottom: 1px solid var(--ks-line);
}

.ks-order-facts > div:last-child { border-bottom: 0; }

.ks-order-facts dt {
  color: var(--ks-muted);
  font-size: 13px;
  font-weight: 600;
}

.ks-order-facts dd {
  margin: 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  font-weight: 700;
}

.ks-order-facts dd bdi {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ks-order-copy {
  flex: 0 0 auto;
  border: 0;
  padding: 0;
  background: none;
  color: var(--ks-price);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.ks-order-code {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--ks-line);
  border-radius: 16px;
  text-align: center;
}

.ks-order-code > span {
  color: var(--ks-muted);
  font-size: 12px;
  font-weight: 700;
}

.ks-order-code b {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

#ks-order-sheet .ks-sheet-scrim { opacity: 0; transition: opacity 0.22s var(--ks-ease); }
#ks-order-sheet.is-open .ks-sheet-scrim { opacity: 1; }
#ks-order-sheet .ks-order-sheet {
  transform: translateY(24px);
  transition: transform 0.24s var(--ks-ease);
}
#ks-order-sheet.is-open .ks-order-sheet { transform: none; }

.ks-pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; }

.ks-pager a, .ks-pager span {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.ks-pager .is-off { color: var(--ks-muted); }

.ks-filters, .ks-segment { display: flex; gap: 8px; flex-wrap: wrap; }

.ks-segment a, .ks-filters button, .ks-choice {
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--ks-line);
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ks-segment a.is-on, .ks-choice:checked + span, .ks-choice.is-on {
  background: rgba(198, 161, 91, 0.14);
  border-color: var(--ks-gold);
}

.ks-kpis { display: grid; gap: 12px; }

.ks-kpi { padding: 16px; }
.ks-kpi span { color: var(--ks-muted); font-size: 13px; }
.ks-kpi strong { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }

.ks-wallet { display: grid; gap: 14px; }
.ks-wallet .ks-home-title { margin: 0; }
.ks-wallet-card {
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 18px 16px;
  background: var(--ks-card);
  border: 1px solid var(--ks-line);
  border-radius: var(--ks-radius);
}
.ks-wallet-card > span { color: var(--ks-muted); font-size: 13px; font-weight: 600; }
.ks-wallet-card strong {
  color: var(--ks-price);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.ks-wallet-card .ks-btn { margin-top: 4px; }
.ks-wallet-dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.ks-wallet-dates .ks-field { margin: 0; min-width: 0; }
.ks-wallet-dates input { padding-inline: 10px; }
.ks-wallet-dates .ks-btn-ghost { grid-column: 1 / -1; width: 100%; }
.ks-wallet .ks-segment {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.ks-wallet .ks-segment a {
  justify-content: center;
  min-width: 0;
  padding-inline: 6px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.ks-wallet-split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ks-wallet-split article {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  background: var(--ks-card);
  border: 1px solid var(--ks-line);
  border-radius: 18px;
}
.ks-wallet-split span { color: var(--ks-muted); font-size: 12px; }
.ks-wallet-split strong {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ks-wallet-split .is-in, .ks-move-amt.is-in { color: var(--ks-up); }
.ks-wallet-split .is-out, .ks-move-amt.is-out { color: var(--ks-down); }
.ks-moves { display: grid; gap: 8px; }
.ks-move {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: var(--ks-card);
  border: 1px solid var(--ks-line);
  border-radius: 16px;
}
.ks-move-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
}
.ks-move-mark svg { width: 18px; height: 18px; }
.ks-move-mark.is-in { background: var(--ks-up-bg); color: var(--ks-up); }
.ks-move-mark.is-out { background: var(--ks-down-bg); color: var(--ks-down); }
.ks-move-body { min-width: 0; }
.ks-move b, .ks-move small { display: block; }
.ks-move-body b {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ks-move small {
  color: var(--ks-muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ks-move-amt {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  unicode-bidi: isolate;
}

.ks-upload {
  display: grid;
  place-items: center;
  min-height: 140px;
  border: 1px dashed rgba(198, 161, 91, 0.7);
  border-radius: var(--ks-radius);
  text-align: center;
  padding: 16px;
  cursor: pointer;
}

.ks-upload input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.ks-copy {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--ks-line);
}

.ks-copy b { flex: 1; overflow: hidden; text-overflow: ellipsis; }

.ks-sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
}

.ks-sheet[hidden] { display: none; }

.ks-sheet-scrim { position: absolute; inset: 0; background: rgba(16, 17, 20, 0.46); border: 0; }

.ks-sheet-panel {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  max-height: min(88dvh, 720px);
  overflow: auto;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  background: var(--ks-card);
  border-radius: 22px 22px 0 0;
}

.ks-sheet-head, .ks-inline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.ks-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  min-height: 48px;
  margin: 0 0 14px;
}

.ks-page-head h1 {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  color: var(--ks-ink);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.15;
  text-align: start;
  padding-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ks-page-head h1::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  bottom: 0;
  width: 22px;
  height: 2px;
  border-radius: 99px;
  background: var(--ks-gold);
}

.ks-page-head .ks-btn-ghost {
  order: 0;
  flex: none;
  height: 32px;
  min-height: 32px;
  padding: 0 14px;
  border-color: transparent;
  background: rgba(198, 161, 91, 0.14);
  color: var(--ks-price);
  font-size: 13px;
  font-weight: 700;
}

.ks-note, .ks-prose, .ks-buy-copy h1, .ks-legal {
  overflow-wrap: anywhere;
}

.ks-prose { max-width: 40rem; display: grid; gap: 12px; }
.ks-prose h1 { font-size: 18px; }
.ks-prose h2 { font-size: 16px; margin-top: 8px; }
.ks-prose ul { margin: 0; padding-inline-start: 18px; }

.ks-legal {
  display: grid;
  gap: 12px;
  max-width: 640px;
}

.ks-legal .ks-home-title { margin: 0; }
.ks-legal-lead { margin: 0; color: var(--ks-muted); }
.ks-legal h2 { margin: 0 0 8px; font-size: 16px; font-weight: 700; }
.ks-legal p { margin: 0; }
.ks-legal p + p { margin-top: 8px; }
.ks-legal ul { margin: 0; padding-inline-start: 18px; display: grid; gap: 6px; }
.ks-legal-contact { display: grid; gap: 8px; }
.ks-legal-contact .ks-btn { width: auto; justify-self: start; min-width: 160px; }

.ks-empty { padding: 28px 16px; text-align: center; display: grid; gap: 8px; justify-items: center; }
.ks-empty .ks-btn { max-width: 240px; }

.ks-gate {
  min-height: 100dvh;
  background:
    radial-gradient(ellipse 90% 42% at 50% -8%, rgba(198, 161, 91, 0.28), transparent 62%),
    var(--ks-bg);
}

html.ks-dark .ks-gate {
  background:
    radial-gradient(ellipse 80% 40% at 50% -10%, rgba(198, 161, 91, 0.16), transparent 58%),
    var(--ks-bg);
}

.ks-gate-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(14px + env(safe-area-inset-top)) 16px 0;
}

.ks-gate-home {
  font-size: 13px;
  font-weight: 700;
  color: var(--ks-price);
}

.ks-auth {
  min-height: calc(100dvh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px calc(28px + env(safe-area-inset-bottom));
}

.ks-gate-card {
  width: min(440px, 100%);
  display: grid;
  gap: 16px;
  padding: 28px 20px 22px;
  background: var(--ks-card);
  border: 1px solid var(--ks-line);
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(28, 25, 21, 0.08);
}

html.ks-dark .ks-gate-card { box-shadow: none; }

.ks-gate-brand {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.ks-gate-brand .ks-mark {
  width: 76px;
  height: 76px;
  border-radius: 22px;
}

.ks-gate-kicker {
  font-family: "Times New Roman", Times, serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--ks-price);
}

.ks-gate-copy { display: grid; gap: 4px; text-align: center; }
.ks-gate-copy h1 { font-size: 22px; font-weight: 700; }
.ks-gate-copy p { margin: 0; color: var(--ks-muted); font-size: 13px; }

.ks-gate-form { display: grid; gap: 12px; }
.ks-gate-block { display: grid; gap: 6px; }
.ks-gate-block > label,
.ks-gate-label label { font-size: 13px; font-weight: 700; }

.ks-gate-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.ks-gate-label a { font-size: 12px; font-weight: 700; color: var(--ks-price); }

.ks-gate-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding-inline: 12px;
  border: 1px solid var(--ks-line);
  border-radius: 16px;
  background: var(--ks-bg);
}

.ks-gate-field:focus-within {
  border-color: var(--ks-gold);
  box-shadow: 0 0 0 3px rgba(198, 161, 91, 0.2);
}

.ks-gate-ico {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(198, 161, 91, 0.16);
  color: var(--ks-price);
}

.ks-gate-ico svg,
.ks-gate-eye svg { width: 18px; height: 18px; }

.ks-gate-field input {
  flex: 1;
  min-width: 0;
  height: 48px;
  border: 0;
  outline: none;
  background: transparent;
  padding: 0;
  font-size: 16px;
}

.ks-gate-field input[type="email"],
.ks-gate-field input[type="password"],
.ks-gate-field input[type="text"][name="otp"] {
  direction: ltr;
  text-align: right;
}

.ks-gate-eye {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ks-muted);
  cursor: pointer;
}

.ks-gate-eye[aria-pressed="true"] { color: var(--ks-price); }

.ks-gate-card .ks-btn { min-height: 50px; margin-top: 2px; }
.ks-gate-card .ks-alert { margin: 0; }
.ks-switch { text-align: center; color: var(--ks-muted); margin: 0; }
.ks-switch a { color: var(--ks-price); font-weight: 700; }

.ks-table { width: 100%; border-collapse: collapse; }
.ks-table th, .ks-table td { text-align: start; padding: 8px 4px; border-bottom: 1px solid var(--ks-line); }

.ks-pre {
  overflow: auto;
  padding: 12px;
  border-radius: 14px;
  background: var(--ks-bg);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
}

.ks-alert { padding: 12px 14px; border-radius: 14px; background: var(--ks-up-bg); color: var(--ks-up); }
.ks-alert.is-no { background: var(--ks-down-bg); color: var(--ks-down); }

:focus-visible {
  outline: 2px solid var(--ks-gold);
  outline-offset: 2px;
}

@media (min-width: 700px) {
  .ks-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ks-page-head { justify-content: space-between; }
  .ks-page-head .ks-btn-ghost { order: 0; }
  .ks-cats, .ks-sections { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ks-kpis { grid-template-columns: repeat(3, 1fr); }
  .ks-wallet, .ks-account, .ks-orders { max-width: 640px; }
  .ks-slide { height: auto; aspect-ratio: 1080 / 560; }
  .ks-slide img { height: 100%; }
}

@media (min-width: 1024px) {
  :root { --ks-header: 64px; }
  .ks-header {
    grid-template-areas: "brand search tools";
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding-inline: 20px;
  }
  .ks-header-theme { display: flex; }
  .ks-side-theme { display: none; }
  .ks-header-search { display: block; grid-area: search; width: min(520px, 100%); justify-self: center; }
  .ks-home-search, .ks-page-search, .ks-search-btn { display: none; }
  .ks-menu-btn { display: none; }
  .ks-side {
    transform: none;
    inset-block: calc(var(--ks-header) + env(safe-area-inset-top)) 0;
    width: var(--ks-side);
    padding: 16px 12px;
  }
  .ks-scrim { display: none; }
  .ks-tabs, body.ks-home .ks-dock { display: none; }
  .ks-balance-chip { max-width: none; height: 40px; }
  .ks-main {
    margin-inline-start: var(--ks-side);
    padding-bottom: 40px;
  }
  body.ks-product .ks-main { padding-bottom: 40px; }
  .ks-buy {
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
  }
  .ks-buy-side {
    position: sticky;
    top: calc(var(--ks-header) + env(safe-area-inset-top) + 16px);
    gap: 12px;
  }
  .ks-card.ks-buy-head {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 14px;
    padding: 28px 22px 22px;
  }
  .ks-buy-media,
  .ks-buy-media img,
  .ks-buy-media .ks-mark {
    width: 148px;
    height: 148px;
    border-radius: 28px;
  }
  .ks-buy-copy h1 {
    display: block;
    overflow: visible;
    font-size: 22px;
    -webkit-line-clamp: unset;
  }
  .ks-buy-offer { justify-content: center; }
  .ks-buy-offer .ks-price { font-size: 26px; }
  .ks-buy-note { margin-top: 0; }
  .ks-card.ks-buy-form,
  .ks-buy-cta { padding: 18px; gap: 16px; }
  .ks-buy-cta {
    background: var(--ks-card);
    border: 1px solid var(--ks-line);
    border-radius: var(--ks-radius);
    box-shadow: var(--ks-shadow);
  }
  .ks-buy-cta .ks-buybar { margin-top: 0; }
  .ks-buybar { position: static; }
  .ks-buybar .ks-btn { max-width: none; }
  .ks-page { width: min(1200px, calc(100% - 48px)); padding-block: 20px 12px; }
  .ks-page-head h1 { font-size: 28px; }
  .ks-home .ks-section { margin-top: 28px; }
  .ks-home-title { font-size: 18px; margin-bottom: 12px; }
  .ks-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .ks-home .ks-grid,
  .ks-grid.ks-catalog { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .ks-home .ks-tile,
  .ks-catalog .ks-tile { border-radius: 18px; }
  .ks-home .ks-tile-body,
  .ks-catalog .ks-tile-body { padding: 10px 8px 14px; }
  .ks-home .ks-tile-name,
  .ks-catalog .ks-tile-name { font-size: 13.5px; }
  .ks-shortcut { min-height: 96px; gap: 8px; padding: 16px 8px; }
  .ks-shortcut span { width: 44px; height: 44px; border-radius: 14px; }
  .ks-shortcut svg { width: 22px; height: 22px; }
  .ks-shortcut b { font-size: 14px; }
  .ks-section-card { padding: 16px; }
  .ks-section-card b { font-size: 16px; }
  .ks-cats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .ks-rail { flex-wrap: wrap; overflow: visible; }
  .ks-stage, .ks-home .ks-section:first-of-type { max-width: none; }
  .ks-slide { height: 380px; aspect-ratio: auto; }
  .ks-slide img { height: 100%; object-fit: cover; object-position: center; }
  .ks-wallet, .ks-account, .ks-orders, .ks-legal { max-width: 720px; margin-inline: auto; }
  .ks-buy { width: min(960px, 100%); margin-inline: auto; }
  .ks-card, .ks-note { padding: 20px; }
  .ks-sheet-panel {
    inset: 12vh 0 auto;
    margin-inline: auto;
    width: min(480px, calc(100% - 32px));
    border-radius: 22px;
  }
}

@media (min-width: 1280px) {
  .ks-home .ks-grid,
  .ks-grid.ks-catalog { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .ks-side, .ks-scrim, .ks-sheet-panel { transition: none; }
  #ks-order-sheet .ks-order-sheet { transform: none; }
  .ks-home-title span,
  .ks-home-title span::after,
  .ks-buybar-sum b.is-live { animation: none; }
}
