:root {
  color-scheme: dark;
  --bg: #0d0f10;
  --surface: #151719;
  --surface-2: #1b1e20;
  --surface-3: #222527;
  --line: #34383b;
  --line-soft: #292d30;
  --text: #f4f5f5;
  --muted: #a7adb1;
  --orange: #ff681f;
  --orange-strong: #ff7a2f;
  --green: #2ccf84;
  --danger: #ff6767;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; color: var(--text); background: var(--bg); }
button, input { font: inherit; }
button { cursor: pointer; }

.access-shell { min-height: 100svh; display: grid; grid-template-columns: minmax(360px, .9fr) minmax(440px, 1.1fr); }
.access-brand { min-height: 100svh; padding: max(26px, env(safe-area-inset-top)) clamp(28px, 5vw, 76px) max(28px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--line-soft); background: #111314; }
.brand-lockup { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-lockup img { width: 52px; height: 52px; object-fit: contain; }
.brand-lockup span { display: grid; }
.brand-lockup b { font-size: 18px; }
.brand-lockup small { color: var(--muted); font-size: 12px; }
.access-intro { max-width: 620px; }
.eyebrow { display: block; color: var(--orange); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.access-intro h1 { margin: 9px 0 16px; max-width: 12ch; font-size: clamp(38px, 5vw, 68px); line-height: 1.02; letter-spacing: 0; }
.access-intro p { max-width: 48ch; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.55; }
.brand-points { display: flex; flex-wrap: wrap; gap: 18px; }
.brand-points span { display: inline-flex; align-items: center; gap: 8px; color: #dadddf; font-size: 12px; font-weight: 800; }
.brand-points svg { width: 17px; color: var(--orange); }

.access-panel { width: min(590px, 100%); align-self: center; justify-self: center; padding: 42px clamp(22px, 6vw, 76px); }
.panel-heading h2 { margin: 7px 0 0; font-size: 28px; }
.experience-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 26px 0; }
.experience-option { min-width: 0; min-height: 88px; display: grid; grid-template-columns: 42px minmax(0, 1fr) 20px; align-items: center; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; transition: border-color .18s ease, background .18s ease; }
.experience-option:hover { border-color: #555b5f; }
.experience-option:has(input:checked) { border-color: var(--orange); background: #1b1917; box-shadow: inset 3px 0 0 var(--orange); }
.experience-option input { position: absolute; opacity: 0; pointer-events: none; }
.experience-option > span:nth-of-type(2) { min-width: 0; display: grid; gap: 3px; }
.experience-option b { font-size: 14px; }
.experience-option small { color: var(--muted); font-size: 10px; line-height: 1.25; }
.experience-icon { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface-3); color: var(--orange); }
.experience-icon svg { width: 20px; }
.selection-mark { width: 18px; opacity: 0; color: var(--orange); }
.experience-option:has(input:checked) .selection-mark { opacity: 1; }

.login-form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field > span { color: #c7cbce; font-size: 11px; font-weight: 800; }
.input-wrap { height: 48px; display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 7px; padding: 0 11px; border: 1px solid var(--line); border-radius: 6px; background: #111314; }
.input-wrap:focus-within { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,104,31,.12); }
.input-wrap > svg { width: 17px; color: var(--muted); }
.input-wrap input { min-width: 0; height: 100%; border: 0; outline: 0; color: var(--text); background: transparent; }
.input-wrap input::placeholder { color: #6e7478; }
.icon-button { width: 38px; height: 38px; display: inline-grid; place-items: center; padding: 0; border: 1px solid transparent; border-radius: 6px; color: var(--muted); background: transparent; }
.icon-button:hover { color: var(--text); background: var(--surface-3); }
.icon-button svg { width: 18px; }
.primary-button, .secondary-button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; border-radius: 6px; font-weight: 900; }
.primary-button { border: 1px solid var(--orange); color: #16110e; background: var(--orange); }
.primary-button:hover { background: var(--orange-strong); }
.primary-button:disabled { opacity: .58; cursor: wait; }
.primary-button svg, .secondary-button svg { width: 18px; }
.secondary-button { border: 1px solid var(--line); color: var(--text); background: var(--surface-2); }
.login-status { min-height: 20px; margin: 0; color: var(--muted); font-size: 12px; }
.login-status.error { color: var(--danger); }
.login-status.success { color: var(--green); }

.context-picker { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line-soft); }
.context-picker h3 { margin: 6px 0 12px; font-size: 18px; }
.context-list { display: grid; gap: 8px; }
.context-button { width: 100%; display: grid; grid-template-columns: 38px minmax(0,1fr) 20px; align-items: center; gap: 10px; padding: 10px; text-align: left; border: 1px solid var(--line); border-radius: 6px; color: var(--text); background: var(--surface); }
.context-button:hover { border-color: var(--orange); }
.context-button > span { display: grid; gap: 2px; }
.context-button small { color: var(--muted); }
.context-button svg { width: 18px; color: var(--orange); }

.install-button { width: 100%; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 10px; margin-top: 22px; padding: 10px; text-align: left; border: 1px solid var(--line); border-radius: 6px; color: var(--text); background: var(--surface); }
.install-button:not([hidden]) { display: grid; }
.install-button > svg { width: 20px; color: var(--orange); }
.install-button span { display: grid; gap: 2px; }
.install-button small { color: var(--muted); font-size: 10px; }
.privacy-note { display: flex; align-items: flex-start; gap: 7px; margin: 18px 0 0; color: #7f8589; font-size: 10px; line-height: 1.4; }
.privacy-note svg { width: 14px; flex: 0 0 auto; }

.install-dialog { width: min(430px, calc(100vw - 28px)); padding: 0; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: #141617; }
.install-dialog::backdrop { background: rgba(0,0,0,.78); }
.install-dialog form { position: relative; padding: 24px; }
.dialog-close { position: absolute; top: 10px; right: 10px; }
.dialog-icon { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 16px; border-radius: 50%; color: var(--orange); background: #242628; }
.install-dialog h2 { margin: 7px 0 12px; font-size: 22px; }
.install-dialog ol { margin: 0 0 20px; padding-left: 20px; color: var(--muted); line-height: 1.7; }

@media (max-width: 780px) {
  .access-shell { display: block; }
  .access-brand { min-height: 220px; padding: max(18px, env(safe-area-inset-top)) 20px 22px; justify-content: flex-start; gap: 30px; border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .access-intro h1 { max-width: 16ch; font-size: 31px; }
  .access-intro p { font-size: 13px; }
  .brand-points { display: none; }
  .access-panel { padding: 24px 18px max(30px, env(safe-area-inset-bottom)); }
}

@media (max-width: 460px) {
  .experience-switch { grid-template-columns: 1fr; }
  .experience-option { min-height: 72px; }
}

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