.reader-mobile-chrome-reveal,
.reader-mobile-flow-hint {
  display: none;
}

@media (pointer: coarse) and (max-width: 820px), (pointer: coarse) and (max-height: 600px) {
  .reader-mobile-chrome-control :is(button, input, select, summary),
  button.reader-mobile-chrome-control {
    min-height: 44px;
  }

  .reader-mobile-chrome-control.reader-mobile-chrome-collapsed {
    display: none !important;
  }

  #reader-panel.reader-mobile-chrome-hidden :is(.flow-header, .flow-tools-panel, .flow-footer) {
    display: none !important;
  }

  .reader-mobile-chrome-active > .reader-mobile-chrome-reveal {
    position: absolute;
    top: max(0px, env(safe-area-inset-top, 0px));
    left: max(8px, env(safe-area-inset-left, 0px));
    z-index: 48;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 4px;
    min-width: 76px;
    min-height: 44px;
    padding: 4px 8px;
    border: 1px solid var(--ui-border-strong);
    border-top: 0;
    border-radius: 0 0 4px 4px;
    background: var(--ui-surface);
    color: var(--ui-text-soft);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
  }

  .reader-mobile-chrome-reveal::before {
    content: "";
    width: 24px;
    height: 4px;
    border-radius: 4px;
    background: currentColor;
  }

  .reader-mobile-chrome-active > .reader-mobile-flow-hint {
    position: absolute;
    z-index: 40;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 8px;
    padding: 8px 12px;
    border: 1px solid var(--ui-border-strong);
    border-radius: 4px;
    background: var(--ui-surface);
    color: var(--ui-text);
    box-shadow: 0 4px 16px var(--ui-menu-shadow);
    font-size: 13px;
  }

  .reader-mobile-flow-hint > span {
    flex-basis: 100%;
  }

  .reader-mobile-flow-hint > button {
    min-width: 44px;
    min-height: 44px;
    padding: 4px 8px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--ui-text-soft);
    cursor: pointer;
    font: inherit;
  }

  .reader-mobile-flow-hint > button:first-of-type {
    color: var(--ui-primary);
  }

  :is(.reader-mobile-chrome-reveal, .reader-mobile-flow-hint > button):focus-visible {
    outline: 2px solid var(--ui-focus);
    outline-offset: 2px;
  }
}

.reader-mobile-chrome-reveal[hidden],
.reader-mobile-flow-hint[hidden] {
  display: none !important;
}
