#photo-editor-launcher,
.photo-edit-badge,
#photo-editor-panel button,
#photo-editor-panel select,
#photo-editor-panel input { font: inherit; }

#photo-editor-launcher {
  position: fixed; z-index: 105; right: 24px; bottom: 24px;
  min-height: 48px; padding: 0 20px; border: 1px solid #F1F0EA;
  background: #F1F0EA; color: #111111; box-shadow: 0 12px 35px #0008;
  font-family: "IBM Plex Mono", monospace; font-size: 11px; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase; cursor: pointer;
}
#photo-editor-launcher:hover { background: #71918C; border-color: #71918C; }
#photo-editor-launcher[hidden], #photo-editor-panel[hidden] { display: none; }

#photo-editor-panel {
  position: fixed; z-index: 120; top: 0; right: 0; bottom: 0;
  width: min(420px, 100vw); overflow-y: auto; overscroll-behavior: contain;
  padding: 26px 25px 36px; border-left: 1px solid #65727A;
  background: #191b1b; color: #F1F0EA; box-shadow: -20px 0 60px #0009;
}
.photo-editor-top { display: flex; align-items: start; justify-content: space-between; gap: 18px; }
.photo-editor-top h2 { margin: 5px 0 0; font-size: 38px; font-weight: 300; letter-spacing: -.06em; }
.photo-editor-kicker, .photo-editor-help, .photo-editor-field, .photo-editor-source > p,
.photo-editor-upload, .photo-editor-actions button, .photo-editor-status {
  font-family: "IBM Plex Mono", monospace;
}
.photo-editor-kicker { margin: 0; color: #71918C; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.photo-editor-close { width: 38px; height: 38px; border: 1px solid #65727A; background: transparent; color: #F1F0EA; font-size: 26px !important; cursor: pointer; }
.photo-editor-help { margin: 17px 0 24px; color: #a6b5ba; font-size: 11px; line-height: 1.6; }
.photo-editor-field { display: block; margin: 16px 0; font-size: 11px; letter-spacing: .03em; }
.photo-editor-field select, .photo-editor-field input { display: block; width: 100%; margin-top: 8px; }
.photo-editor-field select { height: 40px; padding: 0 10px; border: 1px solid #65727A; background: #222; color: #F1F0EA; }
.photo-editor-field input[type=range] { accent-color: #71918C; cursor: pointer; }
.photo-editor-field output { float: right; color: #8299A5; }
.photo-editor-preview { position: relative; overflow: hidden; width: 100%; margin: 18px auto 22px; border: 1px solid #65727A; background: #111; cursor: grab; touch-action: none; user-select: none; }
.photo-editor-preview:active { cursor: grabbing; }
.photo-editor-preview img { width: 100%; height: 100%; max-width: none; object-fit: cover; pointer-events: none; transform: scale(var(--photo-zoom, 1)); }
.photo-editor-controls { padding: 1px 0 9px; border-top: 1px solid #65727A; border-bottom: 1px solid #65727A; }
.photo-editor-source > p { margin: 22px 0 10px; color: #a6b5ba; font-size: 10px; }
.photo-editor-library { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.photo-editor-library button { aspect-ratio: 1; padding: 0; border: 2px solid transparent; background: #222; cursor: pointer; overflow: hidden; }
.photo-editor-library button[aria-pressed=true] { border-color: #71918C; }
.photo-editor-library img { width: 100%; height: 100%; object-fit: cover; }
.photo-editor-upload { position: relative; display: grid; place-items: center; min-height: 45px; margin-top: 18px; border: 1px dashed #8299A5; color: #F1F0EA; font-size: 11px; cursor: pointer; }
.photo-editor-upload:hover { background: #254D50; }
.photo-editor-upload input { position: absolute; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.photo-editor-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 20px; }
.photo-editor-actions button { min-height: 46px; padding: 8px 10px; border: 1px solid #71918C; background: #71918C; color: #111; font-size: 10px; cursor: pointer; }
.photo-editor-actions button + button { background: transparent; color: #F1F0EA; }
.photo-editor-actions button:disabled { opacity: .55; cursor: wait; }
.photo-editor-status { min-height: 34px; margin: 13px 0 0; color: #a6b5ba; font-size: 10px; line-height: 1.5; }
.photo-editor-status.is-error { color: #f0b0a9; }

.photo-edit-badge { display: none; position: absolute; z-index: 10; right: 12px; top: 12px; min-height: 36px; padding: 0 12px; border: 1px solid #F1F0EA; background: #111d; color: #F1F0EA; font-family: "IBM Plex Mono", monospace; font-size: 10px; cursor: pointer; }
.hero > .photo-edit-badge { top: 100px; right: 40px; }
body.photo-editing .photo-edit-badge { display: block; }
body.photo-editing .gallery-item { outline: 2px solid #71918C; outline-offset: -2px; cursor: pointer; }
body.photo-editing .gallery-item:hover { outline-color: #F1F0EA; }

@media (max-width: 760px) {
  #photo-editor-launcher { right: 14px; bottom: 14px; min-height: 44px; padding-inline: 14px; }
  #photo-editor-panel { width: 100vw; padding: 22px 20px 32px; }
  .hero > .photo-edit-badge { top: 76px; right: 20px; }
}
/* Independent hosting admin area */
.admin-toolbar { position: relative; z-index: 100; display: flex; justify-content: space-between; align-items: center; padding: .5rem 1rem; background: #111; color: #fff; font: 14px sans-serif; }
.admin-toolbar button { border: 1px solid #fff; border-radius: 3px; padding: .4rem .8rem; color: #fff; background: transparent; cursor: pointer; }
.admin-login { min-height: 100vh; display: grid; place-items: center; padding: 2rem; background: #111; color: #fff; font-family: sans-serif; }
.admin-login-card { width: min(100%, 390px); }
.admin-login-card a { color: #fff; }
.admin-login-card h1 { margin: 2rem 0 .5rem; }
.admin-login-card form { display: grid; gap: .8rem; margin-top: 2rem; }
.admin-login-card input, .admin-login-card button { padding: .8rem; font: inherit; }
.admin-login-card button { cursor: pointer; }
