:root {
  --yo: #9b26af;
  --yo-dark: #7b1c8c;
  --yo-hot: #c2185b;
  --yo-bright: #e040fb;
  --ink: #ffffff;
  --muted: rgba(255, 255, 255, 0.72);
  --danger: #ff8a80;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

html,
body {
  margin: 0;
  height: 100%;
  background: #9b26af;
  background-color: var(--yo);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  overscroll-behavior: none;
  color-scheme: only light;
}

body {
  min-height: 100dvh;
  min-height: 100svh;
  background: var(--yo);
}

.status-bleed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: env(safe-area-inset-top, 0px);
  min-height: 0;
  background: var(--yo);
  z-index: 50;
  pointer-events: none;
}

#app {
  min-height: 100dvh;
  min-height: 100svh;
  background: var(--yo);
}

.screen {
  min-height: 100dvh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--yo);
}

.auth {
  padding: calc(28px + var(--safe-top)) 28px calc(28px + var(--safe-bottom));
  justify-content: center;
  gap: 18px;
}

.logo {
  font-weight: 800;
  font-size: 72px;
  letter-spacing: 6px;
  text-align: center;
  line-height: 1;
  text-shadow: 0 6px 0 rgba(0, 0, 0, 0.12);
}

.tag {
  text-align: center;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-size: 13px;
  opacity: 0.85;
  margin-top: -8px;
}

form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

input {
  width: 100%;
  border: 0;
  border-radius: 6px;
  padding: 16px 14px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  outline: none;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

input[type="password"] {
  text-transform: none;
  letter-spacing: 2px;
}

input::placeholder {
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  font-weight: 700;
}

button {
  border: 0;
  background: #fff;
  color: var(--yo);
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 18px;
  padding: 16px;
  border-radius: 6px;
  cursor: pointer;
}

button.ghost {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.45);
}

button:active {
  transform: scale(0.98);
}

.error {
  color: var(--danger);
  text-align: center;
  font-weight: 700;
  min-height: 1.2em;
}

.home-top {
  padding: calc(10px + var(--safe-top)) 12px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.home-top h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 4px;
}

.icon-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.friends {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.friend {
  min-height: 92px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  font-size: clamp(28px, 8vw, 42px);
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  user-select: none;
  cursor: pointer;
  padding: 18px 16px;
  text-align: left;
}

.friend-photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.12);
}

.friend-text {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.friend-name {
  line-height: 1.1;
  word-break: break-word;
}

.friend-yos {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--muted);
}

.me-photo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 12px;
  border: 2px solid rgba(155, 38, 175, 0.45);
  background: #f3e6f7;
}

.me-yos {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #7a5a82;
  margin: 0 0 8px;
}

.yoloc {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #eee;
}

.yoloc-label {
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-size: 14px;
  margin-bottom: 10px;
  color: #4a1654;
}

.yoloc-status {
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--yo);
}

.sheet .yoloc-btn {
  width: 100%;
  background: var(--yo);
  color: #fff;
  font-size: 14px;
  padding: 12px;
}

.yoloc-hint {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.4;
  color: #7a5a82;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.friend:nth-child(even) {
  background: rgba(0, 0, 0, 0.06);
}

.friend.flash {
  background: #fff;
  color: var(--yo);
}

.empty {
  padding: 48px 24px;
  text-align: center;
  opacity: 0.9;
  font-size: 18px;
  line-height: 1.5;
}

.home-bottom {
  padding: 10px 16px calc(16px + var(--safe-bottom));
  display: flex;
  gap: 10px;
}

.home-bottom button {
  flex: 1;
  font-size: 14px;
}

.banner {
  position: fixed;
  left: 12px;
  right: 12px;
  top: calc(10px + var(--safe-top));
  background: #fff;
  color: var(--yo);
  border-radius: 12px;
  padding: 16px 18px;
  font-weight: 800;
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: 0.4px;
  text-align: center;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  z-index: 20;
  transform: translateY(-140%);
  transition: transform 0.25s ease;
}

.banner.show {
  transform: translateY(0);
}

.banner.loc {
  color: var(--yo-hot);
}

.modal-wrap {
  position: fixed;
  inset: 0;
  background: rgba(80, 0, 90, 0.45);
  display: flex;
  align-items: flex-end;
  z-index: 15;
}

.sheet {
  width: 100%;
  background: #fff;
  color: #4a1654;
  border-radius: 18px 18px 0 0;
  padding: 20px 20px calc(20px + var(--safe-bottom));
}

.sheet.history-sheet {
  display: flex;
  flex-direction: column;
  max-height: 80vh;
  max-height: 80dvh;
  overflow: hidden;
  padding-bottom: calc(16px + var(--safe-bottom));
}

.sheet.history-sheet h2 {
  flex-shrink: 0;
}

.history-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.sheet.history-sheet > .primary {
  flex-shrink: 0;
  margin-top: 12px;
}

.sheet h2 {
  margin: 0 0 12px;
  letter-spacing: 2px;
  font-size: 18px;
}

.me-photo + h2 {
  text-align: center;
}

.sheet input {
  background: #f3e6f7;
  color: #4a1654;
  text-transform: uppercase;
}

.sheet input[type="password"] {
  text-transform: none;
}

.sheet .row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.sheet .row button {
  flex: 1;
}

.sheet button.primary {
  background: var(--yo);
  color: #fff;
}

.invite {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.4;
  word-break: break-all;
}

.history-item {
  padding: 14px 0;
  border-bottom: 1px solid #eee;
  font-weight: 700;
}

.history-item small {
  display: block;
  font-weight: 500;
  color: #7a5a82;
  margin-top: 4px;
}

.map-link {
  color: var(--yo);
  font-weight: 800;
  text-decoration: none;
}

.hint {
  font-size: 13px;
  opacity: 0.8;
  text-align: center;
  padding: 0 16px 8px;
}

.install {
  margin: 8px 16px 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.12);
  font-size: 13px;
  text-align: center;
}
