[hidden] {
  display: none !important;
}
#crop-stage.selecting {
  touch-action: none;
  cursor: crosshair;
}
#photo-lightbox .lightbox-stage {
  display: flex;
  align-items: center;
  justify-content: center;
}
dialog#photo-lightbox .lightbox-stage img {
  position: static;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform-origin: center center;
  pointer-events: auto;
}
#photo-lightbox.photo-immersive {
  padding: 0;
  width: 100vw;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100dvh;
  border-radius: 0;
}
#photo-lightbox.photo-immersive .lightbox-header,
#photo-lightbox.photo-immersive .gallery-navigation,
#photo-lightbox.photo-immersive p,
#photo-lightbox.photo-immersive .gallery-library-controls {
  display: none !important;
}
.check-label input[type="checkbox"],
.focus-field input[type="checkbox"],
.ai-body input[type="checkbox"] {
  width: 1rem !important;
  height: 1rem;
  flex: 0 0 1rem;
  appearance: auto;
}
:root {
  --line: var(--tblr-border-color);
  --soft: var(--tblr-bg-surface-secondary);
  --ink: var(--tblr-body-color);
  --muted: var(--tblr-secondary-color);
  --pink: var(--tblr-primary);
  --primary: var(--tblr-primary);
  --surface: var(--tblr-bg-surface);
}
.po-login {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.po-login .card {
  width: min(100%, 27rem);
}
.po-login-logo {
  width: 100%;
  max-width: 260px;
  margin-bottom: 1.5rem;
}
.po-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}
.po-columns .card {
  min-width: 0;
}
.po-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.span-2 {
  grid-column: 1/-1;
}
.po-name {
  display: block;
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  font-weight: 650;
  color: inherit;
}
.po-tags,
.po-row-actions,
.change-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: center;
}
.po-row-actions .btn {
  padding: 0.45rem 0.65rem;
}
.po-avatar {
  border: 0;
  overflow: hidden;
  color: var(--tblr-primary);
  background: var(--tblr-primary-lt);
}
.po-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.po-note {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.po-details {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1rem;
}
.po-details dd {
  margin: 0;
}
.po-group,
.po-doc {
  margin-bottom: 1rem;
}
.po-group summary,
.po-doc summary {
  cursor: pointer;
}
.po-badge {
  display: inline-grid;
  place-items: center;
  min-width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: var(--tblr-primary);
  color: white;
  font-size: 0.7rem;
  padding: 0.1rem;
  line-height: 1;
}
.po-choices {
  display: grid;
  gap: 1rem;
}
.po-choices .btn {
  padding: 1.2rem;
  font-size: 1rem;
}
.po-dialog,
.po-editor,
.ai-dialog {
  padding: 0;
  border: 1px solid var(--tblr-border-color);
  border-radius: var(--tblr-card-border-radius);
  width: min(38rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  background: var(--tblr-bg-surface);
  color: var(--tblr-body-color);
  overflow: auto;
  box-shadow: 0 1rem 4rem #0004;
}
.po-dialog.po-wide,
.po-editor,
.ai-dialog {
  width: min(65rem, calc(100% - 2rem));
}
.po-dialog::backdrop,
.po-editor::backdrop,
.ai-dialog::backdrop {
  background: #15101899;
  backdrop-filter: blur(3px);
}
.po-dialog .card-header,
.po-editor .sheet-head,
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--tblr-bg-surface);
  border-bottom: 1px solid var(--tblr-border-color);
}
.po-dialog h2,
.dialog-heading h2 {
  margin: 0;
  font-size: 1.25rem;
}
.po-dialog form > .form-label,
.po-editor .form-label,
.ai-dialog label {
  display: block;
  margin-bottom: 1rem;
}
.po-editor .dialog-body,
.ai-body {
  padding: 1.25rem;
}
.po-editor .sheet-foot {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--tblr-border-color);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  background: var(--tblr-bg-surface);
  position: sticky;
  bottom: 0;
}
.check-label,
.focus-field {
  display: flex !important;
  gap: 0.5rem;
  align-items: center;
}
.check-label input,
.focus-field input {
  width: auto;
}
.watch-image-settings {
  padding: 1rem;
  border: 1px solid var(--tblr-border-color);
  border-radius: 0.5rem;
  margin: 1rem 0;
}
.watch-image-settings img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  margin: 0.5rem 0;
  cursor: zoom-in;
}
pre {
  color: var(--tblr-body-color);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 28rem;
  overflow: auto;
  background: var(--tblr-bg-surface-secondary);
  padding: 1rem;
  border-radius: 0.5rem;
}
.picker-frame {
  max-height: 65vh;
  overflow: auto;
}
.picker-frame img {
  width: 100%;
  cursor: crosshair;
}
.po-editor details {
  margin: 1rem 0;
}
.po-editor details summary {
  font-weight: 600;
  margin-bottom: 1rem;
}
.ai-body > section {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--tblr-border-color);
  border-radius: 0.5rem;
}
.ai-body img {
  max-width: 100%;
}
.ai-body input[type="checkbox"] {
  width: auto;
}
.error-text {
  color: var(--tblr-danger);
}
.help {
  font-size: 0.85rem;
  color: var(--tblr-secondary-color);
}
.dialog-heading button {
  flex-shrink: 0;
}
.ghost {
  background: transparent;
  border: 0;
  color: var(--tblr-body-color);
  padding: 0.5rem;
}
.crop-scroll {
  max-height: 60vh;
  overflow: auto;
  background: #211d23;
}
#crop-stage {
  position: relative;
  width: 100%;
}
#crop-source {
  display: block;
  width: 100%;
  user-select: none;
}
#crop-outline {
  position: absolute;
  border: 2px solid #ff5ca4;
  box-shadow: 0 0 0 9999px #0006;
  pointer-events: none;
}
.crop-selecting #crop-stage {
  cursor: crosshair;
  touch-action: none;
}
.crop-controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}
.crop-result {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-top: 1rem;
}
#crop-preview {
  width: 128px;
  height: 128px;
}
.crop-result canvas {
  max-width: 35%;
}
.gallery-navigation,
.gallery-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}
.gallery-row {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--tblr-border-color);
}
.gallery-thumb {
  width: 72px;
  height: 72px;
  object-fit: contain;
}
.gallery-photo-button {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  background: none;
  border: 0;
  color: inherit;
}
.gallery-row .change-actions {
  justify-content: flex-end;
}
.photo-import-grid,
.po-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 1rem;
}
.po-photo-button {
  width: 100%;
  height: 140px;
  padding: 0;
  border: 0;
  background: var(--tblr-bg-surface-secondary);
}
.po-photo-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-import-grid img {
  max-width: 100%;
  height: 140px;
  object-fit: contain;
}
.po-full-photo {
  height: 60vh;
  display: grid;
  place-items: center;
  background: #161217;
}
.po-full-photo img {
  max-width: 100%;
  max-height: 60vh;
  touch-action: pan-y;
}
.po-fullscreen {
  width: 100vw !important;
  height: 100dvh !important;
  max-height: none !important;
  border: 0;
  border-radius: 0;
  background: #161217;
}
.po-fullscreen > .card-header,
.po-fullscreen .po-row-actions {
  display: none;
}
.po-fullscreen > .card-body {
  padding: 0;
}
.po-fullscreen .po-full-photo {
  height: 100dvh;
}
.po-fullscreen img {
  max-height: 100dvh;
}
#photo-lightbox {
  padding: 1rem;
  border: 0;
  border-radius: 0.75rem;
  width: min(1100px, calc(100vw - 1rem));
  height: calc(100dvh - 1rem);
  max-height: calc(100dvh - 1rem);
  background: #211d23;
  color: #fff5f9;
}
#photo-lightbox[open] {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
#photo-lightbox::backdrop {
  background: #140f16ee;
}
.lightbox-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.lightbox-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: #151217;
  touch-action: none;
  user-select: none;
  cursor: grab;
}
#photo-lightbox .lightbox-stage img {
  position: absolute;
  max-width: none;
  max-height: none;
  transform-origin: 0 0;
  user-select: none;
  pointer-events: none;
}
#gallery-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.lightbox-zoom {
  display: flex;
  gap: 0.3rem;
}
#photo-lightbox p {
  margin: 0;
  font-size: 0.75rem;
}
#photo-lightbox p:empty {
  display: none;
}
#photo-lightbox .gallery-navigation {
  flex-wrap: nowrap;
}
.lightbox-help {
  text-align: center;
}
.lightbox-immersive .lightbox-header,
.lightbox-immersive .gallery-navigation,
.lightbox-immersive p {
  display: none !important;
}
#photo-lightbox.lightbox-immersive {
  padding: 0;
  width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  border-radius: 0;
}
.lightbox-immersive .lightbox-stage {
  border-radius: 0;
}
@media (max-width: 767px) {
  .po-columns,
  .po-form-grid {
    grid-template-columns: 1fr;
  }
  .span-2 {
    grid-column: auto;
  }
  .starter-list-row {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.75rem;
  }
  .starter-list-row > .po-row-actions {
    grid-column: 2;
  }
  .po-dialog,
  .po-editor,
  .ai-dialog {
    width: calc(100% - 1rem);
    max-height: calc(100dvh - 1rem);
  }
  .po-dialog .card-body,
  .dialog-body,
  .ai-body {
    padding: 1rem;
  }
  .crop-controls {
    grid-template-columns: 1fr;
  }
  .lightbox-zoom {
    display: none;
  }
  .po-group .card-body {
    padding: 0.75rem;
  }
  .overview-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .po-photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

#crop-stage {
  overflow: hidden;
}
.photo-immersive .gallery-library-controls {
  display: none !important;
}
