/* The photo editor (2026-11-27, js/photoedit.js): full screen and dark in both light and dark mode, like the phone's own editor. */
.pe { position: fixed; inset: 0; z-index: 1000; background: #0b0f0d; color: #fff; display: flex; flex-direction: column; font-family: var(--ds-font, var(--display)), system-ui, sans-serif; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); user-select: none; -webkit-user-select: none; }
.pe button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
.pe-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; flex: none; }
.pe .pe-btn { min-height: 40px; padding: 0 14px; border-radius: 12px; background: rgba(255, 255, 255, .12); font-weight: 700; font-size: 14px; white-space: nowrap; }
.pe .pe-btn:disabled { opacity: .35; cursor: default; }
.pe .pe-done { background: #17a366; color: #fff; }
.pe-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pe-cv { display: block; touch-action: none; border-radius: 4px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .14); }
.pe-opts { flex: none; min-height: 56px; display: flex; align-items: center; justify-content: center; padding: 4px 8px; }
.pe-row { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.pe .pe-col { width: 27px; height: 27px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255, 255, 255, .35); }
.pe .pe-col.on { box-shadow: 0 0 0 2px #0b0f0d, 0 0 0 4px #fff; }
.pe-gap { width: 2px; }
.pe .pe-size { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .1); }
.pe .pe-size i { display: block; border-radius: 50%; background: #fff; }
.pe .pe-size.on { background: #17a366; }
.pe-hint { font-size: 13px; color: #c9d6ce; }
.pe-tools { flex: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 8px 10px 12px; max-width: 520px; width: 100%; margin: 0 auto; box-sizing: border-box; }
.pe-tools button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0; border-radius: 14px; font-size: 12.5px; font-weight: 700; color: #dfe9e3; }
.pe-tools button span { font-size: 20px; line-height: 1; }
.pe-tools button.on { background: rgba(23, 163, 102, .28); color: #fff; }
/* sideways phones: the tools down the right side, so the picture keeps its height */
@media (max-height: 460px) and (orientation: landscape) {
  .pe { display: grid; grid-template-columns: 1fr 86px; grid-template-rows: auto 1fr auto; }
  .pe-top { grid-column: 1 / -1; padding: 6px 12px; }
  .pe-stage { grid-column: 1; grid-row: 2; }
  .pe-opts { grid-column: 1; grid-row: 3; min-height: 44px; }
  .pe-tools { grid-column: 2; grid-row: 2 / 4; grid-template-columns: 1fr; align-content: center; padding: 4px; }
  .pe-tools button { padding: 5px 0; }
}
/* the send screen's preview: tap it to edit */
.pe-preview { position: relative; cursor: pointer; }
.pe-preview .gfull { display: block; max-height: 46dvh; object-fit: contain; }
.pe-preview .pe-tag { position: absolute; right: 8px; bottom: 16px; background: rgba(11, 15, 13, .78); color: #fff; border-radius: 10px; padding: 6px 10px; font-size: 12.5px; font-weight: 700; pointer-events: none; }
