:root {
  --bg: #ffffff;
  --ink: #111111;
  --muted: #777777;
  --black: #050505;
  --black-2: #111111;
  --nav-alt: #f4b740;
  --nav-alt-ink: #111111;
  --yellow: #ffe600;
  --yellow-2: #ffb000;
  --line: #ececec;
  --soft: #f8f8f8;
  --shadow: 0 14px 30px rgba(0, 0, 0, 0.1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans Devanagari", "Segoe UI", sans-serif;
}

body {
  overflow-x: hidden;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 10px;
}

.settings-page {
  width: min(100%, 470px);
  min-height: calc(100vh - 20px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #111;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.page-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 12px 12px 8px;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-left: 2px;
}

.nav-button {
  font-family: "Baloo 2", "Noto Sans Devanagari", "Segoe UI", sans-serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  min-height: 28px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffd95e 0%, var(--nav-alt) 100%);
  color: var(--nav-alt-ink);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.nav-button--small {
  min-width: 92px;
}

.nav-button--compact {
  min-width: 88px;
}

.nav-button--footer {
  min-width: 92px;
}

.nav-arrow {
  position: relative;
  width: 0;
  height: 0;
  border-style: solid;
}

.nav-arrow--left {
  border-width: 10px 14px 10px 0;
  border-color: transparent var(--nav-alt-ink) transparent transparent;
}

.nav-arrow--up {
  border-width: 0 9px 14px 9px;
  border-color: transparent transparent var(--nav-alt-ink) transparent;
}

.shortcut-grid {
  display: grid;
  gap: 8px;
  padding: 0 8px 10px;
}

.settings-stack {
  display: grid;
  gap: 8px;
  padding: 0 12px 10px;
}

.settings-block {
  display: grid;
  gap: 5px;
}

.shortcut-button {
  width: min(100%, 352px);
  margin-inline: auto;
  min-height: 42px;
  border: 0;
  border-radius: 16px;
  background: var(--black);
  color: #fff;
  font-family: "Baloo 2", "Noto Sans Devanagari", "Segoe UI", sans-serif;
  font-size: 0.96rem;
  font-weight: 700;
  text-align: center;
  box-shadow: inset 0 -2px 0 rgba(255, 255, 255, 0.08);
}

.shortcut-button--active {
  background: linear-gradient(180deg, #f0f0f0 0%, #424242 100%);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.shortcut-button--location {
  background: linear-gradient(180deg, #f0f0f0 0%, #424242 100%);
  color: #ffffff;
}

.shortcut-button--round {
  min-height: 42px;
}

.shortcut-button:active,
.nav-button:active,
.location-item:active,
.current-location-pill:active {
  transform: translateY(1px);
}

.section-panel {
  width: min(100%, 352px);
  margin: 0 auto 6px;
  padding: 12px 12px 10px;
  border: 1px solid #222;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.section-panel.hidden {
  display: none;
}

.section-panel__titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.section-panel__title {
  font-size: 1rem;
  font-weight: 800;
}

.section-panel__copy {
  font-size: 0.9rem;
  line-height: 1.42;
  font-weight: 600;
  color: #111;
}

.section-panel__field {
  width: 100%;
  min-height: 100px;
  resize: vertical;
  border: 1px solid #ddd;
  background: #f8f8f8;
  color: #111;
  padding: 9px 11px;
  font: inherit;
  border-radius: 12px;
  margin-top: 10px;
}

.section-panel__actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.section-panel__link,
.section-panel__send,
.section-panel__close {
  border: 0;
  background: linear-gradient(180deg, #ffd95e 0%, var(--nav-alt) 100%);
  color: var(--nav-alt-ink);
  font-weight: 800;
  padding: 10px 12px;
  text-decoration: none;
  border-radius: 12px;
}

.section-panel__close {
  min-width: 88px;
  font-family: "Baloo 2", "Noto Sans Devanagari", "Segoe UI", sans-serif;
  font-weight: 700;
}

.location-card {
  width: min(100%, 352px);
  margin: 0 auto 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fcfcfc 100%);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

.location-card__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.section-heading {
  font-size: 1.05rem;
  font-weight: 900;
}

.current-location-pill {
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  margin-bottom: 10px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffcd3a 0%, #ff9f1a 100%);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(255, 159, 26, 0.28);
}

.location-pin {
  width: 10px;
  height: 10px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: #fff;
  position: relative;
  flex: none;
}

.location-pin::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: #ff9f1a;
}

.search-box {
  display: block;
  margin-bottom: 10px;
}

.search-box input {
  width: 100%;
  min-height: 46px;
  border: 2px solid #f4d6d6;
  border-radius: 14px;
  background: #fff;
  padding: 0 14px;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: #111;
  outline: none;
}

.search-box input:focus {
  border-color: #ffad9d;
  box-shadow: 0 0 0 3px rgba(255, 174, 157, 0.18);
}

.location-section {
  padding: 10px 0 0;
  border-top: 1px solid #efefef;
}

.location-section + .location-section {
  margin-top: 10px;
}

.location-section__title {
  font-size: 1rem;
  font-weight: 900;
  margin-bottom: 8px;
}

.location-list {
  display: grid;
  gap: 8px;
}

.location-item {
  width: 100%;
  border: 1px solid #f2d5d5;
  border-radius: 16px;
  background: #fafafa;
  color: #111;
  text-align: left;
  padding: 12px 14px;
  font-size: 0.98rem;
  font-weight: 800;
}

.location-item--recent {
  background: #fff7f0;
}

.location-item--empty {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  padding: 8px 2px;
}

.page-footer {
  margin-top: auto;
  padding: 8px 12px 12px;
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid #f1f1f1;
  background: #fff;
}

.page-footer .nav-button {
  border-radius: 12px;
}

@media (min-width: 520px) {
  .page-shell {
    padding: 18px;
  }

  .settings-page {
    min-height: min(100vh - 36px, 960px);
  }
}
