:root {
  --page: #f4f4f2;
  --surface: #fff;
  --ink: #111;
  --muted: #6c6c68;
  --quiet: #8a8a86;
  --line: #d8d8d4;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  min-width: 280px;
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; letter-spacing: 0; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.visually-hidden {
  width: 1px;
  height: 1px;
  padding: 0;
  position: absolute;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.open-shell, .error-shell {
  width: min(720px, calc(100% - 40px));
  min-height: 100svh;
  margin-inline: auto;
  padding-block: 38px;
  display: grid;
  grid-template-rows: auto 1fr;
}

.open-brand { width: 92px; display: block; }
.open-brand img { width: 100%; height: auto; }

.open-panel, .error-panel {
  padding-block: 54px;
  align-self: center;
  text-align: center;
}

h1 {
  margin: 0 0 18px;
  font-size: 46px;
  line-height: 1.15;
  letter-spacing: 0;
}

.open-description, .error-panel > p:not(.error-code) {
  margin: 0 auto 28px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.open-button, .return-link {
  min-height: 48px;
  padding: 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 750;
  text-decoration: none;
}

.open-button { background: var(--ink); color: #fff; }
.return-link { margin-top: 28px; background: transparent; color: var(--ink); }

.open-qr {
  width: 246px;
  margin: 0 auto;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.open-qr img { width: 210px; height: 210px; margin-inline: auto; }
.open-qr p { margin: 14px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.mobile-only { display: none; }

.is-mobile .desktop-only { display: none; }
.is-mobile .mobile-only { display: inline-flex; }
.is-mobile p.mobile-only { display: block; }

.open-fallback {
  max-width: 430px;
  margin: 22px auto 0;
  color: var(--quiet);
  font-size: 13px;
  line-height: 1.7;
}

.error-panel .open-button { margin-top: 4px; }

a:focus-visible {
  outline: 3px solid #676764;
  outline-offset: 4px;
}

@media (max-width: 540px) {
  .open-shell, .error-shell { width: calc(100% - 36px); padding-block: 24px; }
  .open-brand { width: 76px; }
  .open-panel, .error-panel { padding-block: 44px; }
  h1 { font-size: 36px; }
  .open-description, .error-panel > p:not(.error-code) { font-size: 15px; }
  .open-button, .return-link { width: 100%; }
}

@media (max-width: 340px) {
  .open-shell, .error-shell { width: calc(100% - 28px); }
  h1 { font-size: 32px; }
}
