:root {
  color: #191919;
  background: #f5f5f5;
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: #f5f5f5;
}

button,
input {
  font: inherit;
}

.send-page {
  display: grid;
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(32px, env(safe-area-inset-top)) 28px max(32px, env(safe-area-inset-bottom));
  place-items: center;
}

.send-form {
  display: grid;
  width: 100%;
  max-width: 360px;
  gap: 14px;
  transform: translateY(-7vh);
}

#handoff-token {
  width: 100%;
  height: 54px;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  outline: none;
  color: #191919;
  background: #fff;
  box-shadow: 0 2px 10px rgb(0 0 0 / 3%);
  font-size: 17px;
  line-height: 54px;
  padding: 0 17px;
  transition:
    border-color 120ms ease,
    box-shadow 120ms ease;
}

#handoff-token::placeholder {
  color: #b2b2b2;
}

#handoff-token:focus {
  border-color: #267ef0;
  box-shadow: 0 0 0 3px rgb(38 126 240 / 10%);
}

#send-button {
  width: 100%;
  height: 54px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: #267ef0;
  cursor: pointer;
  font-size: 18px;
  font-weight: 500;
  transition:
    background 120ms ease,
    transform 80ms ease;
}

#send-button:active {
  background: #1f6fd8;
  transform: scale(0.99);
}

.feedback {
  min-height: 20px;
  margin: 0;
  color: #888;
  font-size: 13px;
  line-height: 1.55;
  text-align: center;
}

.feedback[data-state="error"] {
  color: #fa5151;
}

.feedback[data-state="success"] {
  color: #267ef0;
}

.environment-trigger {
  position: fixed;
  z-index: 2;
  top: max(16px, env(safe-area-inset-top));
  right: 18px;
  border: 0;
  color: #777;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  line-height: 32px;
  padding: 0 6px;
}

.environment-overlay {
  position: fixed;
  z-index: 10;
  display: grid;
  background: rgb(0 0 0 / 42%);
  inset: 0;
  padding: 24px;
  place-items: center;
}

.environment-overlay[hidden] {
  display: none;
}

.environment-dialog {
  width: min(100%, 360px);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 40px rgb(0 0 0 / 18%);
  padding: 18px;
}

.environment-dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.environment-dialog h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}

#environment-close {
  border: 0;
  color: #267ef0;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  padding: 6px;
}

.environment-content dl {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}

.environment-content dl div {
  display: flex;
  min-width: 0;
  justify-content: space-between;
  gap: 18px;
}

.environment-content dt,
.environment-content dd {
  margin: 0;
}

.environment-content dt {
  color: #999;
}

.environment-content dd {
  overflow: hidden;
  color: #666;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
