/* Extend the gallery's original sky, leaf and sunflower palette. */
.gallery-actions,.compare-actions,.studio-heading { display:flex; flex-wrap:wrap; gap:12px; align-items:center; }
.gallery-actions { margin:24px 0 12px; }
.studio-button { min-height:48px; padding:12px 20px; border:2px solid var(--button-yellow-dark); border-radius:24px; background:var(--button-yellow); color:#573b00; font:700 1rem Arial,sans-serif; cursor:pointer; text-align:center; text-decoration:none; }
.studio-button.primary { background:#2f7d3c; border-color:#23612d; color:white; }
.studio-button.danger { background:#fff1ed; color:#9b3027; border-color:#b9574c; }
#extra-details { padding:12px 0; }
#extra-details summary { min-height:48px; cursor:pointer; font-weight:700; }
#extra-details label { margin:12px 0 8px; }
.studio-button:disabled { opacity:.6; cursor:wait; }
.studio-button:focus-visible, .studio-panel input:focus-visible,.studio-panel textarea:focus-visible { outline:3px solid #3478ff; outline-offset:4px; }
.gallery-actions small,.studio-panel small,.pin-dialog small,.gallery-filters small,.gallery-card small { display:block; font-size:.83rem; line-height:1.9; font-weight:500; }
rt { font-size:.62em; }
.studio-panel { padding:24px; margin:24px 0; border:2px solid #aed6aa; border-radius:24px; background:var(--soft); box-shadow:var(--shadow); }
.studio-heading { justify-content:space-between; align-items:flex-start; margin-bottom:20px; }
.studio-heading h2 { margin:0; font-size:1.6rem; }
#studio-fields { border:0; padding:0; margin:0; min-width:0; display:grid; gap:12px; }
#studio label,.pin-dialog label { font-weight:700; display:block; }
#studio input:not([type=range]):not([type=file]):not([type=radio]),#studio textarea,.pin-dialog input { font:inherit; font-size:1rem; padding:14px; width:100%; border:2px solid #b6cdb4; border-radius:12px; background:white; color:var(--ink); }
#studio textarea { resize:vertical; }
.picture-picker { justify-self:start; }
.file-control { max-width:100%; font-size:1rem; margin-bottom:8px; }
#preview-area { position:sticky; top:8px; z-index:4; background:var(--soft); border-radius:18px; box-shadow:0 8px 12px #2f7d3c12; }
.preview-frame { position:relative; background:#e5efea; border-radius:18px; overflow:hidden; text-align:center; }
#picture-preview { display:block; max-width:100%; max-height:460px; width:auto; height:auto; margin:auto; }
#preview-label { position:absolute; bottom:12px; left:12px; background:#fff; border-radius:20px; padding:7px 14px; font-weight:700; }
.compare-actions { justify-content:center; margin:12px 0; }
.category-field { border:0; padding:0; margin:10px 0; min-width:0; }
.category-field legend { margin-bottom:12px; font-weight:700; }
.category-choices { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.category-choice { position:relative; cursor:pointer; }
.category-choice input { position:absolute; opacity:0; width:1px; height:1px; }
.category-choice span { display:block; height:100%; border:2px solid #b6cdb4; padding:14px 8px; border-radius:16px; background:white; text-align:center; font-size:.95rem; }
.category-choice input:checked+span { border-color:#2f7d3c; background:#ddf3d3; box-shadow:inset 0 0 0 2px #2f7d3c; }
.category-choice input:focus-visible+span { outline:3px solid #3478ff; outline-offset:3px; }
#adjustments { border-top:1px solid #b6cdb4; padding-top:12px; }
#adjustments h3 { margin:0 0 16px; }
#adjustments output { float:right; color:#276932; }
#adjustments input[type=range] { width:100%; min-height:44px; accent-color:#2f7d3c; margin:4px 0 10px; cursor:pointer; }
.neutral-note { font-size:.85rem; text-align:center; }
.publish-button { width:100%; font-size:1.2rem; margin-top:8px; }
#remove-picture { width:100%; margin-top:16px; }
#publish-progress { width:100%; margin-top:20px; accent-color:#2f7d3c; }
#studio-status,#gallery-status,#pin-status { line-height:1.6; overflow-wrap:anywhere; }
.pin-dialog { width:min(420px,calc(100% - 32px)); border:2px solid #6fbd45; border-radius:24px; padding:24px; color:var(--ink); }
.pin-dialog::backdrop { background:rgba(20,45,25,.5); }
.pin-dialog h2 { margin-top:0; }
.pin-dialog input { margin:10px 0; }
.gallery-filters { display:flex; flex-wrap:wrap; gap:10px; margin:24px 0; }
.gallery-filters button { flex:1 1 130px; padding:10px; background:white; border-color:#b6cdb4; color:var(--ink); }
.gallery-filters button[aria-pressed=true] { background:#ddf3d3; border-color:#2f7d3c; }
.gallery-card { scroll-margin-top:24px; }
.gallery-card .caption p { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.6; }
.gallery-card .caption h2 { overflow-wrap:anywhere; }
.gallery-card.new-picture { outline:5px solid var(--button-yellow); animation:welcome-picture 1s ease 3; }
.photo-category { color:#35643b; font-size:.9rem; }
.image-pending { position:absolute; inset:20% 12px auto; padding:16px; border-radius:16px; background:white; text-align:center; font-weight:700; }
.image-pending .studio-button { display:block; margin:10px auto 0; }
.gallery-grid .empty-gallery { grid-column:1 / -1; padding:28px; background:white; border-radius:20px; }
[hidden] { display:none !important; }
@keyframes welcome-picture { 50% { box-shadow:0 0 0 10px #ffd84d50; } }
@media(max-width:600px) {
  .studio-panel { padding:16px; border-radius:18px; }
  .category-choices { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .gallery-actions>* { flex:1 1 140px; }
  .studio-heading h2 { font-size:1.3rem; flex:1; }
  .studio-heading button { padding:8px 14px; }
  #picture-preview { max-height:min(260px,32vh); }
  #preview-area .compare-actions { margin:6px 0; gap:8px; }
  #preview-area .studio-button { padding:7px 12px; }
  .gallery-filters { gap:8px; }
  .gallery-filters button { flex-basis:42%; }
}
@media(prefers-reduced-motion:reduce) { .gallery-card.new-picture { animation:none; } }
