:root {
  --brand: #f17a27;
  --brand-dark: #c45e12;
  /* v32: page background sampled from the OBL logo's blue-gray panel. */
  --bg: #7898a0;
  --ink: #1a1a1a;
  --muted: #2b3942;
  --card: #ffffff;
  --line: #5a7880;
  --error: #c0392b;
  --ok: #2a8f3e;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  font-size: 17px;
  line-height: 1.4;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

main#app {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 18px 32px;
  min-height: 100vh;
  min-height: 100dvh;
}

.screen {
  display: none;
  animation: fade 180ms ease;
}
.screen.active {
  display: block;
}
@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Header */
.brand {
  text-align: center;
  margin: 8px 0 20px;
}
.brand-logo {
  display: block;
  margin: 0 auto 12px;
  max-width: 280px;
  width: 80%;
  height: auto;
}
.brand-sub {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.start-point {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 18px;
}

/* Input */
.room-input {
  display: flex;
  justify-content: center;
  margin: 10px 0 18px;
}
#roomInput {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: 8px;
  text-align: center;
  width: 220px;
  padding: 14px 10px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  outline: none;
  caret-color: transparent;
}
#roomInput::placeholder {
  color: #cfc6b3;
  letter-spacing: 2px;
  font-weight: 500;
}

/* Keypad */
.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.key {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 14px;
  padding: 18px 0;
  font-size: 26px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: transform 80ms, background 120ms;
  user-select: none;
}
.key:active {
  transform: scale(0.96);
  background: #fff2e1;
}
.key-fn {
  color: var(--muted);
  font-size: 22px;
}

/* CTA */
.cta {
  display: block;
  width: 100%;
  padding: 16px;
  background: var(--brand);
  color: #fff;
  border: 0;
  border-radius: 14px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 140ms, transform 80ms;
}
.cta:active {
  transform: scale(0.99);
  background: var(--brand-dark);
}
.cta:disabled {
  background: #e7d7c1;
  color: #b09c81;
  cursor: not-allowed;
}
.cta-ghost {
  background: transparent;
  color: var(--brand-dark);
  border: 2px solid var(--brand);
  margin-top: 14px;
}
.cta-ghost:active {
  background: #fff2e1;
}

.error-text {
  color: var(--error);
  text-align: center;
  margin: 10px 0 0;
  font-size: 14px;
}

.foot {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin-top: 24px;
}

/* Directions screen */
.back-link {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 15px;
  padding: 0 0 10px;
  cursor: pointer;
}
.dest-title {
  margin: 4px 0 2px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.dest-title span {
  color: var(--brand-dark);
}
.dest-sub {
  margin: 0 0 14px;
  color: var(--muted);
}

.floorplan {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px;
  margin-bottom: 16px;
}
.floorplan svg {
  display: block;
  width: 100%;
  height: auto;
}

.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0 0 14px;
}
.steps li {
  counter-increment: step;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px 12px 46px;
  position: relative;
  margin-bottom: 8px;
  font-size: 15px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 10px;
  top: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
