.mobile-review {
  display: none;
}

@media (min-width: 0) {
  html,
  body {
    width: 100%;
    height: 100%;
    overflow: hidden;
  }

  body:not(.mobile-review-ready) > x-dc {
    visibility: hidden;
  }

  body.mobile-review-ready > x-dc {
    display: none;
  }

  .mobile-review {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    width: 100%;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #e7dccb;
    color: #241f1c;
    font-family: Archivo, system-ui, sans-serif;
  }

  .mobile-review-source {
    display: none !important;
  }

  .mobile-review__header {
    flex: 0 0 auto;
    padding: max(14px, env(safe-area-inset-top)) 16px 12px;
    background: #faf1e2;
    border-bottom: 1px solid #c9b79b;
  }

  .mobile-review__masthead {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
  }

  .mobile-review__brand {
    font-family: Rye, serif;
    font-size: 20px;
    line-height: 1;
    color: #ce2c3b;
  }

  .mobile-review__meta {
    font-family: "Archivo Narrow", sans-serif;
    font-size: 11px;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: #7a6a58;
    white-space: nowrap;
  }

  .mobile-review__tabs {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 1px 0 2px;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-review__tabs::-webkit-scrollbar {
    display: none;
  }

  .mobile-review__tab {
    appearance: none;
    flex: 0 0 auto;
    border: 1px solid #c9b79b;
    border-radius: 0;
    padding: 7px 10px;
    background: #f2e4cf;
    color: #4a4038;
    font-family: Oswald, sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
  }

  .mobile-review__tab[aria-selected="true"] {
    border-color: #241f1c;
    background: #241f1c;
    color: #faf1e2;
  }

  .mobile-review__toolbar {
    flex: 0 0 auto;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 16px;
    background: #e7dccb;
    border-bottom: 1px solid #c9b79b;
  }

  .mobile-review__title {
    overflow: hidden;
    font-family: Oswald, sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .mobile-review__zoom {
    appearance: none;
    flex: 0 0 auto;
    border: 0;
    padding: 5px 0 5px 14px;
    background: transparent;
    color: #ce2c3b;
    font-family: "Archivo Narrow", sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .mobile-review__stage {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    background:
      linear-gradient(rgba(36, 31, 28, 0.035) 1px, transparent 1px),
      linear-gradient(90deg, rgba(36, 31, 28, 0.035) 1px, transparent 1px),
      #e7dccb;
    background-size: 20px 20px;
  }

  .mobile-review__stage[data-mode="fit"] {
    display: flex;
    justify-content: center;
    padding: 12px;
  }

  .mobile-review__stage[data-mode="read"] {
    display: block;
    padding: 12px;
  }

  .mobile-review__frame {
    position: relative;
    flex: 0 0 auto;
  }

  .mobile-review__canvas {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: top left;
    color: #241f1c;
    font-family: Archivo, system-ui, sans-serif;
  }

  .mobile-review__hint {
    position: fixed;
    right: 14px;
    bottom: max(14px, env(safe-area-inset-bottom));
    z-index: 3;
    max-width: 190px;
    padding: 8px 10px;
    background: rgba(36, 31, 28, 0.91);
    color: #faf1e2;
    font-family: "Archivo Narrow", sans-serif;
    font-size: 11px;
    letter-spacing: 0.08em;
    line-height: 1.35;
    text-transform: uppercase;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .mobile-review__hint[hidden] {
    display: none;
  }
}
