.admin { width: min(100% - 48px, 1320px); }
.admin > .section { padding-top: clamp(20px, 3vw, 42px); }
.admin-nav { gap: 4px; padding: 5px; background: #e6ebdf; border-radius: 12px; }
.admin-nav .button { min-height: 42px; border-color: transparent; background: transparent; }
.admin-nav .button:hover { background: #fff; color: #193125; }
.admin-nav .button[aria-pressed="true"] { background: #19382b; color: #fff; }
.admin-record { transition: background-color .18s, border-color .18s; }
.admin-record:hover { background: #f1f6e9; border-color: #8aa477; }
.admin-panel-head { gap: 10px; flex-wrap: wrap; }
.builder-layout { display: grid; grid-template-columns: minmax(280px, 420px) minmax(0, 1fr); gap: clamp(12px, 2.3vw, 28px); align-items: start; }
#builder-form, .builder-group-body, .builder-link, .builder-order { display: grid; gap: 10px; min-width: 0; }
#builder-form { align-content: start; grid-template-columns: minmax(0, 1fr); }
.builder-group { min-width: 0; background: #fff; border: 1px solid #d4decf; border-radius: 12px; }
.builder-group summary { cursor: pointer; font-weight: 800; padding: 13px 15px; }
.builder-group[open] summary { border-bottom: 1px solid #e4e9e0; }
.builder-group-body { padding: 14px; grid-template-columns: minmax(0, 1fr); }
.builder-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.builder-inputs label, .builder-group-body > label, .catalog-fields label { min-width: 0; overflow-wrap: anywhere; }
.builder-inputs :is(input, textarea, select), .builder-group-body > label input { min-width: 0; width: 100%; }
.builder-inputs .check-label input, .club-visibility input { width: auto; flex: 0 0 auto; }
.builder-link { border: 1px solid #dbe2d7; background: #f6f8f3; padding: 10px; border-radius: 9px; }
.builder-row-tools { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.builder-row-tools .button, .builder-preview-head .button { min-height: 34px; padding: 4px 8px; font-size: .82rem; }
.builder-order { margin: 0; padding-left: 24px; }
.builder-order-row { padding: 6px 0; }
.builder-order-row span { display: inline-block; margin-bottom: 4px; overflow-wrap: anywhere; }
.builder-preview { position: sticky; top: 16px; border: 1px solid #d3decf; border-radius: 12px; background: #e7eee1; overflow: hidden; }
.builder-preview-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px; padding: 10px 13px; }
.builder-preview-head .button[aria-pressed="true"] { color: #fff; background: #234632; }
.builder-viewport { overflow: hidden; }
#builder-frame { display: block; margin: 0 auto; width: 100%; height: min(74dvh, 780px); background: #fff; border: 0; border-top: 1px solid #d3decf; }
#builder-frame[data-device="mobile"] { max-width: 390px; }
#admin-feedback.show {
  position: fixed; z-index: 5;
  inset: calc(var(--admin-viewport-top, 0px) + max(8px, env(safe-area-inset-top))) 0 auto;
  width: min(calc(100% - 24px), 560px); margin: 0 auto;
  box-shadow: 0 8px 24px #19312526;
}
#admin-feedback:not(.show), .editor-footer .form-feedback:empty, .settings-save-bar p:empty {
  position: absolute; display: block; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%);
}
#dismiss-message { flex-shrink: 0; width: 44px; height: 44px; }
.settings-save-bar {
  position: sticky; z-index: 2;
  bottom: calc(var(--admin-viewport-inset, 0px) + env(safe-area-inset-bottom));
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 12px;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
.settings-save-bar p { margin: 0; flex: 1 1 160px; }
.club-visibility { margin: 5px 0 1px; color: #405847; font-size: .82rem; font-weight: 600; }
.catalog-fields > div { min-width: 0; }
.geocode-action .status { margin: 5px 0 0; }
.geocode-action .status:empty { display: none; }
.crop-preview { height: clamp(155px, 25vw, 246px); position: relative; isolation: isolate; border-radius: 8px; overflow: hidden; background: #203e2f; color: #fff; cursor: grab; touch-action: none; }
.crop-preview:active { cursor: grabbing; }
.crop-preview img, .crop-preview span { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.crop-preview img { object-fit: cover; z-index: -2; }
.crop-preview span { background: linear-gradient(90deg, #091b14d9, #091b1420); z-index: -1; }
.crop-preview strong { display: block; position: absolute; bottom: 13%; left: 5%; right: 6%; font-size: clamp(1rem, 2.5vw, 1.35rem); pointer-events: none; }
.crop-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 9px 0; gap: 6px 12px; }
.crop-controls input { accent-color: #245133; min-height: 36px; width: 100%; }
.button.danger { color: #962f24; background: #fff7f4; border: 1px solid #d69b91; }
.button.danger:hover { color: #fff; background: #922f26; border-color: #922f26; }
#delete-dialog { max-width: 460px; }
#delete-dialog form { margin: 0; }
.editor-dialog {
  --editor-height: var(--admin-viewport-height, 100dvh);
  position: fixed; inset: calc(var(--admin-viewport-top, 0px) + var(--editor-height) / 2) 0 auto;
  transform: translateY(-50%); margin: 0 auto;
  max-height: calc(var(--editor-height) - 16px); padding: 0; overflow: hidden;
}
.editor-form, #draft-form {
  display: flex; flex-direction: column; max-height: calc(var(--editor-height) - 18px);
  padding: 0; border: 0; margin: 0;
}
.editor-head, .editor-footer { flex: none; padding: 10px 16px; }
.editor-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.editor-head h2 { margin: 0; font-size: clamp(1rem, 4vw, 1.35rem); overflow-wrap: anywhere; }
.editor-head .dialog-close { position: static; flex: 0 0 44px; width: 44px; height: 44px; }
.editor-body { min-height: 0; margin: 0; padding: 13px 16px; overflow: auto; overscroll-behavior: contain; scroll-padding: 12px; }
.editor-footer { border-top: 1px solid var(--line); background: #f6f8f3; }
.editor-dialog .admin-actions { position: static; border: 0; padding: 0; background: transparent; }
.editor-dialog .editor-secondary:not(:has(> :not([hidden]))) { display: none; }
.editor-form button:disabled, .settings-save-bar button:disabled { opacity: .58; cursor: wait; }
.form-feedback { margin: 0; overflow-wrap: anywhere; }
.editor-footer .form-feedback:not(:empty) { margin-bottom: 7px; }
[data-state="success"].form-feedback { color: #315b3a; }
[data-state="pending"].form-feedback { color: #405847; }
#builder-status[data-state="error"] { color: #883b22; }
.admin [aria-invalid="true"], .editor-form [aria-invalid="true"] { border-color: #a3452b; }
@media (max-width: 900px) {
  .admin { width: calc(100% - 28px); }
  .builder-layout { grid-template-columns: minmax(0, 1fr); }
  .builder-preview { position: static; }
  #builder-frame { height: min(76dvh, 600px); }
  :is(.admin, .editor-form) :is(input, textarea, select) { font-size: 16px; }
  .editor-footer .button, .settings-save-bar .button { min-height: 44px; }
}
@media (max-width: 510px) {
  .admin { width: calc(100% - 20px); }
  .admin-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-nav .button { font-size: .83rem; line-height: 1.22; padding: 6px; }
  .builder-inputs, .crop-controls { grid-template-columns: minmax(0, 1fr); }
  .editor-head, .editor-body, .editor-footer { padding-inline: 11px; }
  .settings-save-bar .admin-actions { flex: 1 1 auto; }
  .settings-save-bar .button { flex-grow: 1; }
}
@media (prefers-reduced-motion: reduce) { .admin-record { transition: none; } }

.pride-editor-settings { margin-bottom: 16px; }
.pride-editor-search { display: block; width: min(100%, 460px); }
.pride-cover-editor { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; margin-bottom: 9px; }
.pride-cover-fields { display: grid; gap: 8px; min-width: 0; }
#pride-cover-preview {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; place-items: center;
  width: clamp(68px, 18vw, 116px); aspect-ratio: 1; border-radius: 50%;
  border: 3px solid #4d9561; background: #1d4634; color: #d7f5ac;
  font-size: 1.6rem; font-weight: 800;
}
#pride-cover-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#pride-article-list {
  max-height: 253px; overflow: auto; overscroll-behavior: contain; margin: 7px 0 10px;
  border: 1px solid #dae2d6; border-radius: 8px;
}
.pride-editor-article { display: flex; align-items: center; gap: 10px; padding: 6px 8px; justify-content: space-between; }
.pride-editor-article + .pride-editor-article { border-top: 1px solid #e3e8df; }
.pride-editor-article label { min-width: 0; font-size: .87rem; overflow-wrap: anywhere; }
.pride-editor-article .button { flex: 0 0 auto; min-height: 34px; padding: 5px 8px; font-size: .78rem; }
