.pcam {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: #000;
  color: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.pcam-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pcam-tip {
  display: block;
  margin-top: 4px;
  font: 600 .95rem/1.35 var(--f-body);
  color: #d8f5e6;
}
.pcam-focus {
  position: absolute;
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
  border: 2px solid #ffd54a;
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.25);
}
.pcam-focus.is-on {
  opacity: 1;
  transform: scale(1);
  transition: transform .2s, opacity .1s;
}
.pcam-flash {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity .14s;
}
.pcam.is-flash .pcam-flash {
  opacity: .55;
  transition: none;
}
.pcam-top {
  position: relative;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 14px;
  background: linear-gradient(rgba(0, 0, 0, .7), rgba(0, 0, 0, 0));
}
.pcam-title {
  margin: 0 0 4px;
  font: 600 .85rem/1.3 var(--f-body);
  opacity: .8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pcam-next {
  margin: 0;
  font: 600 1.15rem/1.35 var(--f-body);
}
.pcam-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 16px 16px calc(28px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, .7));
}
.pcam-side {
  min-height: 48px;
  min-width: 72px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 24px;
  background: rgba(0, 0, 0, .35);
  color: #fff;
  font: 600 1rem var(--f-body);
  cursor: pointer;
}
.pcam-side[aria-pressed=true] {
  background: #fff;
  color: #000;
}
.pcam-side-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.pcam-shutter {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 4px solid #fff;
  background: transparent;
  padding: 5px;
  cursor: pointer;
}
.pcam-shutter span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #fff;
}
.pcam-shutter:disabled span {
  opacity: .5;
}
.pcam-count {
  margin: 6px 0 0;
  font: 600 .9rem var(--f-body);
  color: #d8f5e6;
  text-shadow: 0 1px 3px #000;
}
.pcam-count:empty {
  display: none;
}
body.pcam-open {
  overflow: hidden;
}
.pcam-toast {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  z-index: 1200;
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #1b2420;
  color: #fff;
  font: 600 .95rem var(--f-body);
}
.cropx {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: #000;
  color: #fff;
  display: flex;
  flex-direction: column;
}
.cropx-help {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 8px;
  font: 600 .95rem/1.35 var(--f-body);
}
.cropx-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  margin: 0 12px;
  touch-action: none;
}
.cropx-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
}
.cropx-box {
  position: absolute;
  border: 2px solid #fff;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, .55);
  cursor: move;
}
.cropx-h {
  position: absolute;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
}
.cropx-h::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 12px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .4);
}
.cropx-tl {
  left: 0;
  top: 0;
}
.cropx-tr {
  left: 100%;
  top: 0;
}
.cropx-br {
  left: 100%;
  top: 100%;
}
.cropx-bl {
  left: 0;
  top: 100%;
}
.cropx-bar {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px calc(24px + env(safe-area-inset-bottom, 0px));
}
.cropx-save {
  background: #fff;
  color: #000;
}
