/* English comments only */

/* Optional: define tokens */
:root{
  --khh-bg: rgba(10, 14, 22, .72);
  --khh-border: rgba(255,255,255,.12);
  --khh-glass: rgba(14, 18, 28, .92);
  --khh-text: rgba(255,255,255,.92);
  --khh-sub: rgba(255,255,255,.55);
  --khh-shadow: 0 18px 50px rgba(0,0,0,.55);
}


/* Header bar */
.khh-header{
  position: sticky;
  top: 0;
  z-index: 100000; /* above everything */
  background: var(--khh-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--khh-border);
  margin-bottom: 50px;
}

html{
  scrollbar-gutter: stable; /* modern browsers */
  overflow-y: scroll;       /* fallback: always reserve scrollbar space */
}

/* Overlay starts below header (JS sets --khh-h) */
.khh-backdrop{
  position: fixed;
  left: 0; right: 0; bottom: 0;
  top: var(--khh-h, 0px);
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
  z-index: 99990;
}


.khh-wrap{
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.khh-brand{
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.khh-logo{
  height: 34px;
  width: auto;
  display: block;
}

/* Button */
.khh-btn{
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid var(--khh-border);
  background: rgba(14, 18, 28, .55);
  box-shadow: 0 10px 30px rgba(0,0,0,.30);
  cursor: pointer;
}

.khh-btn:hover{
  background: rgba(14, 18, 28, .75);
}

/* Burger icon */
.khh-burger{
  display: block;
  width: 18px;
  height: 12px;
  margin: 0 auto;
  position: relative;
}

.khh-burger::before,
.khh-burger::after,
.khh-burger span{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 2px;
  background: rgba(255,255,255,.85);
}

.khh-burger::before{ top: 0; }
.khh-burger::after{ bottom: 0; }
.khh-burger span{ top: 5px; }

/* Backdrop */
/*.khh-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
  z-index: 99990;
}*/

.khh-menu{
  position: fixed;
  width: min(360px, calc(100vw - 28px));
  border-radius: 18px;
  background: var(--khh-glass);
  border: 1px solid var(--khh-border);
  box-shadow: var(--khh-shadow);
  z-index: 99991; /* brute force */

  transform: translateY(-6px) scale(.98);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;

  /* Important: never let menu go off-screen */
  max-height: calc(100vh - 90px);
  overflow: auto;
}

.khh-menu.khh-open{
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}
.khh-menu::before{ display:none; }
/* Arrow */
.khh-menu::before{
  content:"";
  position: absolute;
  top: -8px;
  right: 22px;
  width: 14px;
  height: 14px;
  background: var(--khh-glass);
  border-left: 1px solid var(--khh-border);
  border-top: 1px solid var(--khh-border);
  transform: rotate(45deg);
}

/* Menu head */
.khh-menuHead{
  padding: 14px 16px 10px;
  background: linear-gradient(to bottom, rgba(255,255,255,.06), rgba(255,255,255,0));
}

.khh-menuTitle{
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.75);
}

.khh-menuSub{
  margin-top: 4px;
  font-size: 14px;
  color: var(--khh-sub);
}

.khh-menuBody{
  padding: 6px;
}

/* Divider */
.khh-divider{
  height: 1px;
  margin: 10px 12px;
  background: rgba(255,255,255,.08);
}

/* Items */
.khh-item{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--khh-text);
  border: 1px solid transparent;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}

.khh-ico{
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255,255,255,.06);
  flex: 0 0 28px;
}

.khh-text{
  flex: 1;
  font-size: 16px;
}

.khh-arrow{
  color: rgba(255,255,255,.45);
  font-size: 18px;
}

.khh-item:hover{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.10);
  transform: translateY(-1px);
}

.khh-item:focus-visible{
  outline: 2px solid rgba(120, 140, 255, .55);
  outline-offset: 2px;
}



body.khh-lock{
  position: fixed;
  width: 100%;
  overflow: hidden;
  top: var(--khh-lock-top, 0px);
  left: 0;
  right: 0;
  padding-right: var(--khh-sbw, 0px);
}

html.khh-lock{
  overflow: hidden;
}

.khh-item.khh-active{
  background: rgba(120, 140, 255, .14);
  border-color: rgba(120, 140, 255, .22);
}
.khh-item.khh-active .khh-arrow{
  color: rgba(120, 140, 255, .9);
}