/* A compact entrance page, with one identity and a clear primary action. */
:root {
  color-scheme: light;
  --background: #f6f6f8;
  --card: #fff;
  --foreground: #242630;
  --muted: #737783;
  --border: #e6e7ec;
  --field: #f5f5f8;
  --primary: #ed104b;
  --primary-hover: #d70840;
  --primary-soft: #fff0f4;
  --success: #176a45;
  --success-bg: #eff8f3;
  --error: #b52846;
  --error-bg: #fff0f3;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 280px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
button, summary { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 4px;
}
p { margin: 0; }
.icon { display: block; flex: 0 0 auto; }
.access-shell {
  min-height: 100vh;
  min-height: 100svh;
  padding: max(36px, env(safe-area-inset-top)) 20px max(40px, env(safe-area-inset-bottom));
  background: radial-gradient(ellipse 420px 350px at 50% 240px, #fceef280, transparent);
}
.access-header {
  position: relative;
  width: 100%; max-width: 440px; height: 44px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
}
.brand { display: inline-flex; align-items: center; min-height: 44px; }
.brand img { display: block; width: auto; height: 30px; }
.language-control { position: absolute; right: 0; top: 0; z-index: 10; }
.language-trigger {
  display: grid; place-items: center; width: 44px; height: 44px;
  border-radius: 50%; cursor: pointer; list-style: none;
}
.language-trigger::-webkit-details-marker { display: none; }
.language-trigger img {
  width: 30px; height: 30px; object-fit: cover; border: 1px solid #d9dbe2;
  padding: 3px; border-radius: 50%; background: white;
}
.language-trigger:hover { background: #eaeaf0; }
.language-trigger[aria-disabled='true'] { opacity: .5; cursor: wait; }
.language-menu {
  position: absolute; top: 50px; right: 0; width: 176px;
  padding: 6px; border: 1px solid var(--border); border-radius: 16px;
  background: white; box-shadow: 0 12px 40px #24263018;
}
.language-option {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px;
  padding: 9px 10px; border: 0; border-radius: 10px;
  font-size: 14px; text-align: left; background: white; color: var(--foreground); cursor: pointer;
}
.language-option img { border-radius: 50%; object-fit: cover; }
.language-option:hover, .language-option[aria-pressed='true'] { background: #f3f3f7; }
.access-main { max-width: 440px; margin: 38px auto 0; }
.access-card {
  width: 100%; padding: 0 32px 32px;
  border: 1px solid #e7e6eb; border-radius: 28px;
  background: var(--card);
  box-shadow: 0 24px 70px -32px #37213426, 0 3px 12px #24263004;
}
.access-identity {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 178px; margin: 0 -32px; padding: 32px;
  border-radius: 28px 28px 0 0;
  background: linear-gradient(115deg, #fff 20%, #fcf7f9);
  border-bottom: 1px solid #f1edf0;
}
.identity-copy { min-width: 0; position: relative; z-index: 1; }
.identity-accent { display: block; width: 26px; height: 4px; margin-bottom: 16px; border-radius: 2px; background: var(--primary); }
h1 {
  margin: 0; max-width: 260px; font-size: clamp(27px, 6vw, 34px); font-weight: 650;
  line-height: 1.12; letter-spacing: -.045em; overflow-wrap: anywhere; text-wrap: balance;
}
.door-name { margin-top: 10px; color: var(--muted); font-size: 14px; font-weight: 500; line-height: 1.45; overflow-wrap: anywhere; }
/* An architectural detail; decorative, never an indicator of the lock's state. */
.entrance-art { position: relative; width: 88px; height: 112px; flex: 0 0 88px; }
.entrance-frame {
  position: absolute; inset: 4px 10px 6px 14px; border: 1px solid #e4d9df;
  border-radius: 22px 22px 0 0; background: linear-gradient(145deg, #faf1f5, #eddee5);
  box-shadow: inset 4px 3px 8px #8d5e7910, 6px 7px 12px #80516f08;
}
.entrance-panel {
  position: absolute; top: 13px; bottom: 6px; left: 23px; width: 46px;
  border-radius: 18px 18px 1px 1px; border: 1px solid #e4cbd5;
  background: linear-gradient(110deg, #fffcfd, #f6dce6);
  transform: perspective(220px) rotateY(-24deg); transform-origin: left;
  box-shadow: 5px 2px 7px #ae73971a;
}
.entrance-panel::after { content: ''; position: absolute; right: 7px; top: 56%; width: 3px; height: 9px; background: #bc879d; border-radius: 2px; }
.entrance-step { position: absolute; bottom: 4px; left: 5px; right: 1px; height: 3px; border-radius: 50%; background: #ddc9d380; }
/* The same drawing language for each kind of entrance. A home keeps the arched door above; a building's portal and a garage have their own. */
.entrance-inset { position: absolute; border: 1px solid #ecd3dd; border-radius: 3px; background: linear-gradient(160deg, #fdf3f7, #f8e3eb); }
.entrance-art--street .entrance-frame {
  inset: 4px 3px 6px 7px; border-radius: 12px 12px 0 0;
  background: linear-gradient(#e4d9df, #e4d9df) 0 17px / 100% 1px no-repeat, linear-gradient(145deg, #faf1f5, #eddee5);
}
.entrance-art--street .entrance-leaf, .entrance-art--street .entrance-panel {
  top: 26px; bottom: 6px; width: 33px; border-radius: 2px 2px 1px 1px;
}
.entrance-art--street .entrance-leaf {
  position: absolute; right: 8px; border: 1px solid #e4cbd5;
  background: linear-gradient(110deg, #fffcfd, #f6dce6);
}
.entrance-art--street .entrance-leaf::after { content: ''; position: absolute; left: 4px; top: 44%; width: 2px; height: 14px; background: #bc879d; border-radius: 2px; }
.entrance-art--street .entrance-panel { left: 13px; }
.entrance-art--street .entrance-panel::after { right: 4px; top: 44%; width: 2px; height: 14px; }
.entrance-art--street .entrance-inset { inset: 7px 10px 22px 7px; border-radius: 2px; background: linear-gradient(160deg, #fff, #f3e6ee 55%, #fbf2f6); }
.entrance-art--street .entrance-leaf .entrance-inset { inset: 7px 7px 22px 10px; }
.entrance-art--garage .entrance-frame {
  inset: 20px 0 6px; border-radius: 9px 9px 0 0;
  background: linear-gradient(#e3cdd7, #d9bfcb);
  box-shadow: inset 0 0 0 5px #f5e9ee, inset 0 0 0 6px #e4d9df, 6px 7px 12px #80516f08;
}
.entrance-art--garage .entrance-panel {
  top: 27px; bottom: 30px; left: 7px; right: 7px; width: auto;
  border-radius: 3px 3px 1px 1px; transform: none;
  background: repeating-linear-gradient(180deg, #fffcfd 0 12px, #ecd3dd 12px 13px), #fffcfd;
  box-shadow: 0 5px 7px #ae739733;
}
.entrance-art--garage .entrance-panel::after { right: calc(50% - 6px); top: auto; bottom: 4px; width: 12px; height: 3px; }
.entrance-art--garage .entrance-step { left: -2px; right: -2px; }
#userForm { margin-top: 28px; }
.code-field { margin-bottom: 22px; }
.code-field label { display: block; margin-bottom: 10px; font-size: 14px; font-weight: 550; color: #606470; }
#authCode:not([type='hidden']) {
  display: block; width: 100%; min-height: 66px;
  padding: 15px 20px; border: 1px solid #dedfe7; border-radius: 16px;
  background: var(--field); color: var(--foreground);
  font-size: 24px; font-weight: 500; font-variant-numeric: tabular-nums;
  text-align: center; letter-spacing: .18em; caret-color: var(--primary);
  box-shadow: inset 0 1px 2px #24263003;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
#authCode:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px #ed104b0b; }
#authCode[aria-invalid='true'] { border-color: var(--error); background: #fffafb; }
.access-actions { display: grid; gap: 10px; }
.access-actions--pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.action-button {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-width: 0; min-height: 58px; padding: 15px 12px;
  border: 1px solid transparent; border-radius: 16px;
  font-size: 16px; font-weight: 600; line-height: 1.4;
  cursor: pointer; transition: background .18s, border-color .18s, transform .18s, box-shadow .18s;
}
.action-button--primary {
  background: var(--primary); color: #fff;
  box-shadow: 0 5px 12px #ed104b14, inset 0 1px 0 #ffffff20;
}
.action-button--secondary { background: #f1f1f5; border-color: #ececf1; color: #545864; }
.button-label { min-width: 0; overflow-wrap: anywhere; }
/* Hold to act: the button fills while it is pressed, and empties if released early. */
.action-button { overflow: hidden; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.action-button::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: #ffffff42; transform: scaleX(0); transform-origin: left;
  transition: transform .18s ease-out;
}
.action-button--secondary::before { background: #2426301a; }
.action-button.is-holding::before { transform: scaleX(1); transition: transform .7s linear; }
.button-label, .button-spinner { position: relative; }
@media (hover: hover) {
  .action-button--primary:hover:not(:disabled) { background: var(--primary-hover); box-shadow: 0 6px 18px #ed104b22; }
  .action-button--secondary:hover:not(:disabled) { background: #e8e9f0; border-color: #e0e1e9; color: var(--foreground); }
}
.action-button:active:not(:disabled) { transform: scale(.98); }
.action-button:disabled { cursor: wait; opacity: .55; }
.action-button.is-loading { opacity: 1; font-size: 14px; }
.button-spinner { display: none; flex: 0 0 16px; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.is-loading .button-spinner { display: block; }
.feedback {
  margin-top: 18px; padding: 13px 15px; border-radius: 12px;
  text-align: left; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere;
  color: var(--error); background: var(--error-bg);
}
.feedback[data-state='success'] { color: var(--success); background: var(--success-bg); }
.feedback[data-state='hint'] { color: #7a5200; background: #fff6e0; }
.captcha-wrap { display: flex; justify-content: center; margin-bottom: 24px; }
.unavailable-message { margin-top: 26px; }
.unavailable-message h2 { font-size: 17px; font-weight: 600; }
.unavailable-message p { color: var(--muted); font-size: 14px; }
.access-description { margin-top: 24px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.access-help { margin-top: 8px; color: var(--muted); font-size: 13px; }
.access-page--noweat { --primary: #223b54; --primary-hover: #182d42; --primary-soft: #eef3f7; }
.access-page--noweat .brand img { height: auto; width: 130px; }
.access-page--noweat .access-identity { min-height: 126px; background: #fafcfd; }
.access-page--noweat h1 { max-width: none; }
.access-page--noweat #authCode:not([type='hidden']) { font-size: 20px; letter-spacing: .06em; }
.door-details { margin-top: 28px; padding-top: 24px; border-top: 1px solid #eeedf2; }
.door-note { white-space: pre-wrap; overflow-wrap: anywhere; color: #656976; font-size: 14px; line-height: 1.7; }
.contact-name { margin-top: 18px; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.contact-link {
  display: flex; align-items: center; gap: 10px; min-height: 48px; margin-top: 8px;
  padding: 11px 13px; border-radius: 12px; background: #f7f7f9; font-size: 14px;
}
.contact-link .icon { width: 17px; height: 17px; color: var(--muted); }
.contact-link span { overflow-wrap: anywhere; min-width: 0; }
.contact-link:hover { background: #eeeeF3; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 480px) {
  .access-shell { padding: max(24px, env(safe-area-inset-top)) 20px max(28px, env(safe-area-inset-bottom)); }
  .access-main { margin-top: 30px; }
  .access-card { padding: 0 26px 26px; border-radius: 24px; }
  .access-identity { min-height: 172px; margin: 0 -26px; padding: 26px; border-radius: 24px 24px 0 0; }
  .entrance-art { transform: scale(.9); transform-origin: right center; margin-left: -8px; }
}
@media (max-width: 350px) {
  .access-shell { padding-right: 16px; padding-left: 16px; }
  .access-card { padding-right: 20px; padding-left: 20px; }
  .access-identity { margin-right: -20px; margin-left: -20px; padding: 24px 20px; gap: 8px; }
  .entrance-art { width: 66px; flex-basis: 66px; transform: scale(.8); }
  .action-button { padding-right: 8px; padding-left: 8px; font-size: 15px; }
  .action-button.is-loading { font-size: 12px; gap: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
