/* ---- share ---- */
/* The three things to do when you meet someone: one big, two side by side. */
.share-main {
  display: flex;
  align-items: center;
  gap: 18px;
  text-align: left;
  background: var(--ink);
  color: var(--ink-text);
  border: none;
  border-radius: 22px;
  padding: 22px 20px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.15s var(--ease);
}
.share-main:active {
  transform: scale(0.98);
}
.share-main b {
  display: block;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.6rem;
  line-height: 1.15;
}
.share-main small {
  display: block;
  font-size: 0.85rem;
  line-height: 1.4;
  opacity: 0.75;
  margin-top: 4px;
}
.share-qr {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--ink-text);
  color: var(--ink);
}
.share-qr svg {
  width: 38px;
  height: 38px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.share-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.share-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  cursor: pointer;
  transition:
    transform 0.15s var(--ease),
    border-color 0.2s;
}
.share-tile:hover {
  border-color: var(--text);
}
.share-tile:active {
  transform: scale(0.97);
}
.share-tile b {
  font-size: 1rem;
  font-weight: 600;
}
.share-tile small {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}
.screen.active .share-main {
  animation: rise-in 0.4s var(--ease) both;
}
.screen.active .share-tile {
  animation: rise-in 0.4s var(--ease) both;
  animation-delay: 60ms;
}
.screen.active .share-tile + .share-tile {
  animation-delay: 110ms;
}

/* The scanner: full screen and dark, the camera in a square. The video sits
   on top absolutely, so its own resolution can't stretch the layout (Safari). */
#scanner {
  position: fixed;
  inset: 0;
  z-index: 2600;
  background: #0d0c0b;
  color: #f4f0e8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: max(20px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
  animation: fade-in 0.25s var(--ease);
}
.scanner-head {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  left: 20px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}
.scanner-head .icon-btn {
  color: #f4f0e8;
}
.scanner-head .icon-btn:hover {
  background: #ffffff1f;
}
.scan-view {
  position: relative;
  flex: none;
  width: min(100%, 62dvh, 460px);
  aspect-ratio: 1;
  background: #1a1916;
  border-radius: 26px;
  overflow: hidden;
  animation: pop-in 0.4s var(--ease);
}
.scan-view video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.scan-frame {
  position: absolute;
  inset: 14%;
  border: 2px solid var(--accent);
  border-radius: 18px;
  box-shadow: 0 0 0 100vmax #0007;
}
.scan-frame::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: scan-line 2.4s ease-in-out infinite;
}
#scan-msg {
  text-align: center;
  max-width: 420px;
  font-size: 0.9rem;
  line-height: 1.45;
  opacity: 0.8;
}

.action-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.action {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  cursor: pointer;
  transition:
    transform 0.15s var(--ease),
    border-color 0.2s;
}
.screen.active .action {
  animation: rise-in 0.4s var(--ease) both;
}
.screen.active .action:nth-child(2) {
  animation-delay: 40ms;
}
.screen.active .action:nth-child(3) {
  animation-delay: 80ms;
}
.screen.active .action:nth-child(4) {
  animation-delay: 120ms;
}
.action:hover {
  border-color: var(--text);
}
.action:active {
  transform: scale(0.98);
}
.action-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--sunken);
  font-size: 1.25rem;
}
.action b {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
}
.action small {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 2px;
  line-height: 1.35;
}
