:root {
  color-scheme: dark;
  --ink: #f6f1e7;
  --muted: #b9b5aa;
  --night: #0d1419;
  --night-soft: #151f25;
  --gold: #d3aa56;
  --gold-light: #e9cf94;
  --teal: #78bdb1;
  --line: rgba(233, 207, 148, 0.24);
  --danger: #f0b3ad;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(rgba(211, 170, 86, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(211, 170, 86, 0.025) 1px, transparent 1px);
  background-color: #111b23;
  background-size: 46px 46px;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid #8ccfff;
  outline-offset: 3px;
}

.access-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  align-content: center;
  gap: 20px;
  padding: max(28px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
}

.access-card {
  position: relative;
  width: min(470px, 100%);
  overflow: hidden;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(14, 21, 25, 0.94);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
}

.access-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--gold), #a35568);
}

.access-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.access-brand img {
  width: 62px;
  height: 62px;
  border: 1px solid rgba(233, 207, 148, 0.35);
  border-radius: 7px;
}

.access-brand div {
  display: grid;
  line-height: 1.2;
}

.access-brand span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 700;
}

.access-brand small,
.access-note,
.access-shell > footer {
  color: var(--muted);
}

.access-brand small {
  margin-top: 4px;
  font-size: 12px;
}

.access-intro {
  padding-block: 28px 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--gold-light);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: 0;
}

.access-intro > p:last-child {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.access-message {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(240, 179, 173, 0.35);
  border-radius: 5px;
  background: rgba(129, 47, 50, 0.2);
  color: var(--danger);
  font-size: 14px;
  line-height: 1.5;
}

form {
  display: grid;
  gap: 11px;
}

form > label {
  color: var(--gold-light);
  font-size: 13px;
  font-weight: 750;
}

.code-field {
  position: relative;
}

.code-field input {
  width: 100%;
  min-height: 52px;
  padding: 12px 92px 12px 15px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--ink);
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.code-field input:focus {
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.075);
  box-shadow: 0 0 0 4px rgba(211, 170, 86, 0.11);
  outline: 0;
}

.code-field input::placeholder {
  color: rgba(246, 241, 231, 0.38);
}

.code-field button {
  position: absolute;
  top: 50%;
  right: 8px;
  min-height: 36px;
  padding: 0 9px;
  border: 0;
  background: transparent;
  color: var(--gold-light);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  transform: translateY(-50%);
}

.access-submit,
.install-access {
  min-height: 50px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 800;
}

.access-submit {
  margin-top: 5px;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: #11150f;
  transition: background-color 160ms ease, transform 160ms ease;
}

.access-submit:hover,
.access-submit:focus-visible {
  background: var(--gold-light);
  transform: translateY(-1px);
}

.access-submit:disabled {
  cursor: wait;
  opacity: 0.7;
  transform: none;
}

.access-note {
  margin: 20px 0 0;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.install-access {
  width: 100%;
  margin-top: 14px;
  border: 1px solid rgba(233, 207, 148, 0.42);
  background: transparent;
  color: var(--gold-light);
}

.access-shell > footer {
  width: min(470px, 100%);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  text-align: center;
}

.social-browser-notice {
  position: relative;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px max(16px, calc((100vw - 1120px) / 2));
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  background: #203b45;
  color: #ffffff;
}

.notice-copy p {
  margin: 2px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

.notice-copy small {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
}

.notice-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 7px;
}

.notice-button,
.notice-close {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 5px;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  font-weight: 750;
}

.notice-button {
  padding: 7px 10px;
  font-size: 12px;
}

.notice-close {
  width: 38px;
  padding: 0;
  font-size: 22px;
}

.copy-feedback,
.install-feedback {
  position: fixed;
  z-index: 200;
  right: 16px;
  bottom: 16px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--night-soft);
  color: var(--ink);
  box-shadow: 0 15px 42px rgba(0, 0, 0, 0.35);
}

@media (max-width: 680px) {
  .social-browser-notice {
    align-items: flex-start;
    flex-direction: column;
  }

  .notice-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .access-card {
    padding: 26px 20px;
  }

  h1 {
    font-size: 29px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
