#device-shell[data-model="Xiaomi MIX Flip"][data-pose="cover"] {
  container: mix-cover / inline-size;
}

/* The measured chassis is 721 × 834. The lower lens ends at y=417;
   the document starts at x=242. Anchor the widget to the chassis. */
#mix-cover-nav {
  position: absolute;
  z-index: 2;
  inset: 53.5% auto auto 6%;
  width: 25%;
  height: 35%;
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  isolation: isolate;
  overflow: hidden;
  background: #e4f0de;
  color: #203322;
  border: 1px solid #b8c9b4;
  border-radius: clamp(7px, 3cqw, 15px);
  font: 600 clamp(11px, 3cqw, 15px)/1.1 HHP, system-ui, sans-serif;
}

#mix-cover-nav[hidden] { display: none; }
#mix-cover-nav button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .26em;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0 .15em;
  border: 0;
  border-radius: inherit;
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}
#mix-cover-nav button + button { border-top: 1px solid #20332228; border-radius: 0; }
#mix-cover-nav button[aria-disabled="true"] { color: #566652; cursor: default; }
#mix-cover-nav button:not([aria-disabled="true"]):is(:hover, :active) { background: #a3c89a38; }
#mix-cover-nav button:focus-visible { outline: 2px solid #24572d; outline-offset: -3px; }
#mix-cover-nav button[hidden], #mix-cover-chapters[hidden] { display: none; }
#mix-cover-nav.with-chapters {
  display: grid;
  grid-template-rows: minmax(24px, .7fr) minmax(0, 2.3fr);
}
#mix-cover-nav.with-chapters #mix-cover-contents {
  border-radius: 0;
  border-bottom: 1px solid #20332238;
  background: #d3e5cc;
}
#mix-cover-nav.with-chapters #mix-cover-contents svg { display: none; }
#mix-cover-contents[aria-expanded="true"]::after { content: "⌃"; font-family: system-ui, sans-serif; }
#mix-cover-chapters {
  position: relative;
  overflow-y: auto;
  overscroll-behavior: contain;
  min-height: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
}
#mix-cover-chapters li { margin: 0; padding: 0; }
#mix-cover-chapters li + li { border-top: 1px solid #20332220; }
#mix-cover-chapters button {
  width: 100%;
  min-height: 28px;
  justify-content: flex-start;
  padding: .45em .55em;
  border-radius: 0;
  text-align: start;
  overflow-wrap: anywhere;
}
#mix-cover-chapters [aria-current="location"] {
  background: #c7ddbf;
  box-shadow: inset 3px 0 0 #456743;
}
#mix-cover-nav svg { width: 1em; height: 1em; flex: none; }
.mix-cover-announcement {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
@container mix-cover (max-width: 320px) { #mix-cover-nav svg { display: none; } }
/* When an embedding page leaves less than 24px per button, the contents
   control itself still leads to every section. */
@container mix-cover (max-width: 195px) {
  #mix-cover-nav { display: flex; }
  #mix-cover-nav #mix-cover-contents { flex: 1; }
  #mix-cover-nav button + button { display: none; }
}
@media (forced-colors: active) {
  #mix-cover-nav { color: ButtonText; background: Canvas; border-color: ButtonText; }
  #mix-cover-nav button[aria-disabled="true"] { color: GrayText; }
}
