:root {
  --orange: #e35205;
  --orange-dark: #c84704;
  --navy: #1c287a;
  --ink: #171717;
  --muted: #747474;
  --soft: #f7f4f1;
  --line: #dedede;
  --card: #ffffff;
  --shadow: 0 18px 45px rgb(28 28 28 / 10%);
  --app-viewport-height: 100svh;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #ffffff;
  overscroll-behavior-y: contain;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: var(--app-viewport-height, 100svh);
  margin: 0;
  background: #ffffff;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
}

body.keyboard-open {
  min-height: 0;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.app-shell {
  width: min(100%, 430px);
  min-height: var(--app-viewport-height, 100svh);
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 18px max(16px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 14px;
  background:
    radial-gradient(circle at 82% 12%, rgb(227 82 5 / 12%), transparent 26%),
    linear-gradient(180deg, #ffffff 0%, #fffaf6 48%, #f6f6f6 100%);
}

.location-permission-page.keyboard-open .app-shell {
  min-height: auto;
}

.app-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-top: 4px;
}

.brand-group {
  min-width: 0;
}

.brand-logo-text {
  margin: 0;
  color: var(--orange);
  font-size: clamp(28px, 8vw, 34px);
  font-weight: 950;
  line-height: 0.95;
  letter-spacing: 1.6px;
}

.brand {
  margin: 0;
  color: var(--orange);
  font-size: clamp(23px, 6vw, 28px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 1.2px;
}

.subtitle {
  margin: 8px 0 0;
  color: #4f4f4f;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

.campus {
  max-width: 276px;
  margin: 7px 0 0;
  color: #8a8a8a;
  font-size: 10px;
  line-height: 1.35;
}

.language-button {
  display: none;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--muted);
  background: #efefef;
  border: 0;
  border-radius: 50%;
  box-shadow: 0 10px 18px rgb(0 0 0 / 8%);
  font-size: 11px;
  font-weight: 800;
}

.language-button span {
  font-size: 16px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 126px;
  align-items: center;
  gap: 10px;
  min-height: 150px;
  padding: 2px 0 0;
}

.hero__copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--orange);
  font-size: 12px;
  font-weight: 800;
}

.hero h1 {
  margin: 0;
  color: var(--orange);
  font-size: clamp(25px, 7vw, 32px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: 0;
}

.hero p:last-child {
  margin: 10px 0 0;
  color: #555555;
  font-size: 13px;
  line-height: 1.45;
}

.hero__image {
  width: 126px;
  height: 145px;
  justify-self: end;
  object-fit: contain;
}

.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.steps::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 16.666%;
  right: 16.666%;
  height: 5px;
  border-radius: 999px;
  background: #d9d9d9;
}

.step {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 6px;
  color: #9a9a9a;
  font-size: 10px;
  font-weight: 700;
}

.step span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: #cccccc;
  border-radius: 50%;
  font-size: 21px;
  font-weight: 900;
  box-shadow: 0 4px 10px rgb(0 0 0 / 8%);
}

.step--active {
  color: var(--orange);
}

.step--active span {
  background: var(--orange);
}

.permission-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 13px;
  align-items: center;
  padding: 14px;
  background: var(--card);
  border: 1px solid rgb(227 82 5 / 16%);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.permission-card__icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: rgb(227 82 5 / 10%);
  border-radius: 14px;
}

.permission-card__icon img {
  width: 27px;
  height: 27px;
}

.permission-card h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
}

.permission-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.location-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.location-section h2 {
  margin: 8px 0 8px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.15;
}

.coordinate-field {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 22px;
  background: #e7e7e7;
  border: 0;
  border-radius: 999px;
}

.coordinate-field__icon {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
}

.coordinate-field__text {
  min-width: 0;
  color: var(--orange);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  text-align: left;
  overflow-wrap: anywhere;
}

.location-search {
  position: relative;
  width: 100%;
  min-height: 54px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 7px;
  padding: 5px;
  background: #eef0f2;
  border: 1px solid #e1e4e8;
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgb(0 0 0 / 5%);
}

.location-search:focus-within {
  background: #ffffff;
  border-color: rgb(227 82 5 / 42%);
  box-shadow: 0 0 0 3px rgb(227 82 5 / 12%);
}

.current-location-button,
.location-search__clear {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  background: #ffffff;
  border: 0;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgb(0 0 0 / 7%);
}

.current-location-button:active,
.location-search__clear:active {
  background: rgb(0 0 0 / 6%);
}

.location-search__input {
  width: 100%;
  min-height: 44px;
  min-width: 0;
  padding: 0 13px;
  color: #242424;
  background: #ffffff;
  border: 1px solid #dde1e6;
  border-radius: 999px;
  outline: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  box-shadow: 0 1px 4px rgb(0 0 0 / 6%);
  -webkit-appearance: none !important;
  appearance: none;
}

.location-search__input::-webkit-search-decoration,
.location-search__input::-webkit-search-cancel-button,
.location-search__input::-webkit-search-results-button,
.location-search__input::-webkit-search-results-decoration {
  display: none;
  -webkit-appearance: none;
}

.location-search__input:focus {
  border-color: rgb(227 82 5 / 55%);
}

.location-search__input::placeholder {
  color: #8c8c8c;
  font-weight: 600;
}

.location-search__clear {
  color: #2f7cf6;
  font-size: 24px;
  line-height: 1;
}

.location-suggestions {
  margin-top: -5px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #d9d9d9;
  border-radius: 12px;
  box-shadow: 0 12px 24px rgb(0 0 0 / 10%);
}

.location-suggestions__item {
  width: 100%;
  min-height: 44px;
  display: block;
  padding: 10px 14px;
  color: #252525;
  background: #ffffff;
  border: 0;
  border-bottom: 1px solid #eeeeee;
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
}

.location-suggestions__item:last-child {
  border-bottom: 0;
}

.location-suggestions__item:active,
.location-suggestions__item:hover {
  background: #fff4ec;
  color: var(--orange-dark);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-title h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
}

.text-button {
  padding: 0;
  color: var(--orange);
  background: transparent;
  border: 0;
  font-size: 12px;
  font-weight: 800;
}

.location-input {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  color: var(--orange);
  background: #ffffff;
  border: 1px solid #111111;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
}

.location-input img {
  width: 27px;
  height: 27px;
}

.map-card {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #111111;
  border-radius: 14px;
  box-shadow: 0 14px 28px rgb(0 0 0 / 7%);
}

.map-card__media {
  position: relative;
  height: clamp(158px, 42vw, 190px);
  overflow: hidden;
  background: #f1eee9;
}

.map-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.map-card__body {
  display: grid;
  gap: 8px;
  padding: 12px 15px 14px;
}

.map-card__body p {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.location-help {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.address,
.coords {
  margin: 0;
  color: #565656;
  font-size: 10px;
  line-height: 1.38;
}

.place {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #222222;
  font-size: 12px;
}

.place img {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
}

.note-field {
  display: grid;
  gap: 9px;
}

.note-field span {
  font-size: 15px;
  font-weight: 800;
}

.note-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 13px 16px;
  resize: vertical;
  color: #333333;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  font-size: 16px;
  line-height: 1.35;
}

.note-field textarea::placeholder {
  color: #b1b1b1;
}

.confirm-button {
  width: min(100%, 236px);
  min-height: 46px;
  margin-top: 10px;
  align-self: center;
  padding: 0 28px;
  color: #ffffff;
  background: var(--orange);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 12px 20px rgb(227 82 5 / 22%);
  font-size: 18px;
  font-weight: 900;
}

.confirm-button:active {
  background: var(--orange-dark);
}

.action-bar {
  position: sticky;
  bottom: 0;
  margin: auto -18px calc(-1 * max(18px, env(safe-area-inset-bottom)));
  padding: 14px 18px max(18px, env(safe-area-inset-bottom));
  display: grid;
  gap: 9px;
  background: linear-gradient(180deg, rgb(246 246 246 / 0%), #f6f6f6 22%);
}

.primary-button,
.secondary-button {
  width: 100%;
  min-height: 52px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 800;
}

.primary-button {
  color: #ffffff;
  background: var(--orange);
  border: 0;
  box-shadow: 0 12px 20px rgb(227 82 5 / 23%);
}

.primary-button:active {
  background: var(--orange-dark);
}

.secondary-button {
  color: #6d6d6d;
  background: #ffffff;
  border: 1px solid #e0e0e0;
}

@media (min-width: 431px) {
  html {
    background: #ececec;
  }

  body {
    background: #ececec;
    padding: 24px 0;
  }

  .app-shell {
    min-height: min(880px, calc(100vh - 48px));
    border-radius: 26px;
    box-shadow: 0 22px 60px rgb(0 0 0 / 12%);
  }
}

@media (max-width: 360px) {
  .app-shell {
    padding-left: 14px;
    padding-right: 14px;
    gap: 12px;
  }

  .brand-logo-text {
    font-size: 28px;
  }

  .subtitle {
    margin-top: 6px;
  }

  .campus {
    margin-top: 5px;
    font-size: 9px;
  }

  .steps::before {
    top: 18px;
  }

  .step {
    gap: 5px;
    font-size: 9px;
  }

  .step span {
    width: 38px;
    height: 38px;
    font-size: 19px;
  }

  .location-section {
    gap: 10px;
  }

  .location-section h2 {
    margin-top: 4px;
    font-size: 22px;
  }

  .coordinate-field {
    min-height: 40px;
    padding-inline: 18px;
  }

  .location-search {
    min-height: 50px;
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    gap: 6px;
    padding: 5px;
  }

  .current-location-button,
  .location-search__clear {
    width: 40px;
    height: 40px;
  }

  .location-search__input {
    min-height: 40px;
    padding-inline: 11px;
    font-size: 16px;
  }

  .map-card__media {
    height: 150px;
  }

  .map-card__body {
    padding: 10px 14px 12px;
  }

  .map-card__body p {
    font-size: 14px;
  }

  .note-field {
    gap: 7px;
  }

  .note-field textarea {
    min-height: 42px;
    padding-block: 11px;
  }

  .confirm-button {
    min-height: 42px;
    margin-top: 8px;
    font-size: 16px;
  }

  .hero {
    grid-template-columns: 1fr 108px;
  }

  .hero__image {
    width: 108px;
    height: 126px;
  }

  .action-bar {
    margin-left: -14px;
    margin-right: -14px;
    padding-left: 14px;
    padding-right: 14px;
  }
}

@media (max-height: 760px) {
  .app-shell {
    padding-top: max(16px, env(safe-area-inset-top));
    gap: 11px;
  }

  .app-header {
    padding-top: 0;
  }

  .brand-logo-text {
    font-size: clamp(27px, 7vw, 32px);
  }

  .subtitle {
    margin-top: 6px;
    font-size: 12px;
  }

  .campus {
    margin-top: 4px;
    font-size: 9px;
  }

  .language-button {
    width: 38px;
    height: 38px;
  }

  .steps {
    margin-top: 0;
  }

  .steps::before {
    top: 18px;
    height: 4px;
  }

  .step {
    gap: 4px;
    font-size: 9px;
  }

  .step span {
    width: 38px;
    height: 38px;
    font-size: 19px;
  }

  .location-section {
    gap: 9px;
  }

  .location-section h2 {
    margin: 2px 0 2px;
    font-size: 22px;
  }

  .coordinate-field {
    min-height: 38px;
  }

  .location-search {
    min-height: 50px;
  }

  .coordinate-field__icon {
    width: 27px;
    height: 27px;
  }

  .map-card__media {
    height: 142px;
  }

  .map-card__body {
    padding: 10px 14px 12px;
  }

  .map-card__body p {
    font-size: 14px;
    line-height: 1.16;
  }

  .note-field {
    gap: 6px;
  }

  .note-field span {
    font-size: 14px;
  }

  .note-field textarea {
    min-height: 40px;
    padding: 10px 14px;
  }

  .confirm-button {
    min-height: 40px;
    width: min(100%, 210px);
    margin-top: 8px;
    font-size: 16px;
  }
}
