:root{
  --rrm-ink:#1f2a1f;
  --rrm-muted:#5f685b;
  --rrm-soft:#f4efe6;
  --rrm-panel:#f8f5ef;
  --rrm-card:#fdfbf8;
  --rrm-line:rgba(34,43,33,.12);
  --rrm-accent:#5c7a2f;
  --rrm-accent-deep:#476022;
  --rrm-accent-soft:#dce7c5;
  --rrm-danger:#a23b2a;
  --rrm-shadow:0 20px 44px rgba(36,29,20,.14);
  --rrm-radius:24px;
}

.rrm{
  color:var(--rrm-ink);
  background:
    radial-gradient(circle at top left, rgba(164,191,118,.22), transparent 34%),
    radial-gradient(circle at top right, rgba(215,178,127,.18), transparent 36%),
    linear-gradient(180deg, #f3eee4 0%, #fbf8f3 28%, #ffffff 100%);
}

.rrm-top{
  position:relative;
  background:transparent;
  border-bottom:0;
}

.rrm-top-inner{
  display:block;
  max-width:none;
  width:100%;
  margin:0;
  padding:0;
}

.rrm-catbar{
  position:relative;
  top:auto;
  left:auto;
  right:auto;
  z-index:1;
  display:flex;
  flex-direction:row;
  flex-wrap:nowrap;
  align-items:stretch;
  justify-content:center;
  gap:0;
  width:100vw;
  overflow-x:auto;
  overflow-y:hidden;
  padding:0;
  margin:0;
  margin-left:calc(50% - 50vw);
  margin-right:calc(50% - 50vw);
  border-top:1px solid rgba(255,255,255,.15);
  border-bottom:1px solid rgba(0,0,0,.10);
  border-left:0;
  border-right:0;
  border-radius:0;
  background:#4a3535;
  box-shadow:none;
  scrollbar-width:none;
}

.rrm-catbar::-webkit-scrollbar{
  display:none;
}

.rrm-catlink{
  appearance:none;
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:0;
  flex:0 0 auto;
  min-height:42px;
  padding:10px 20px;
  border:0;
  border-right:1px solid rgba(255,255,255,.16);
  border-radius:0;
  background:transparent;
  color:#ffffff;
  box-shadow:none;
  cursor:pointer;
  transition:background .16s ease, color .16s ease, box-shadow .16s ease;
}

.rrm-catlink:last-child{
  border-right:0;
}

.rrm-catlink:hover{
  background:rgba(255,255,255,.12);
  color:#fff;
}

.rrm-catlink.is-active{
  border-right-color:transparent;
  background:#4a8903;
  color:#fff;
  box-shadow:inset 0 1px 2px rgba(0,0,0,.24);
}

.rrm-catlink:focus-visible{
  outline:none;
  background:rgba(255,255,255,.12);
  box-shadow:0 0 0 3px rgba(74,137,3,.30);
}

.rrm-catname{
  display:block;
  font-size:13px;
  font-weight:700;
  letter-spacing:.03em;
  line-height:1;
  white-space:nowrap;
  color:inherit;
}

.rrm-body{
  background:transparent;
}

.rrm-body-inner{
  max-width:none;
  width:100%;
  margin:0;
  padding:14px clamp(16px, 4vw, 64px) 90px;
}

.rrm-chipset{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.rrm-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:9px 14px;
  border:1px solid rgba(40,49,36,.12);
  border-radius:999px;
  background:rgba(255,255,255,.78);
  color:var(--rrm-ink);
  font:600 13px/1 "Avenir Next","Segoe UI",sans-serif;
  letter-spacing:.02em;
  text-decoration:none;
  cursor:pointer;
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease, color .16s ease;
}

.rrm-chip:hover{
  transform:translateY(-1px);
  border-color:rgba(71,96,34,.28);
  box-shadow:0 12px 22px rgba(35,30,22,.08);
}

.rrm-chip.is-active,
.rrm-chip.is-on{
  color:#fff;
  border-color:var(--rrm-accent);
  background:linear-gradient(135deg, var(--rrm-accent), var(--rrm-accent-deep));
}

.rrm-adminbar{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:8px 0 18px;
}

.rrm-btn,
.rrm-input{
  font:600 14px/1.2 "Avenir Next","Segoe UI",sans-serif;
}

.rrm-btn{
  min-height:44px;
  padding:11px 16px;
  border:1px solid rgba(29,37,28,.12);
  border-radius:16px;
  background:#fff;
  color:var(--rrm-ink);
  cursor:pointer;
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

.rrm-btn:hover{
  transform:translateY(-1px);
  border-color:rgba(40,49,36,.2);
  box-shadow:0 14px 28px rgba(36,29,20,.09);
}

.rrm-btn-primary{
  color:#fff;
  border-color:var(--rrm-accent);
  background:linear-gradient(135deg, var(--rrm-accent), var(--rrm-accent-deep));
}

.rrm-grid{
  column-width:320px;
  column-gap:18px;
  margin-top:0;
}

.rrm-card{
  position:relative;
  break-inside:avoid;
  margin:0 0 18px;
  border-radius:24px;
  overflow:hidden;
  background:var(--rrm-card);
  box-shadow:var(--rrm-shadow);
  border:1px solid rgba(255,255,255,.62);
}

.rrm-card-media{
  display:block;
  position:relative;
  width:100%;
  padding:0;
  border:0;
  background:#e9e2d5;
  cursor:pointer;
}

.rrm-card-media picture,
.rrm-card-media img{
  display:block;
  width:100%;
  height:100%;
}

.rrm-card-media img{
  object-fit:cover;
}

.rrm-card-overlay{
  position:absolute;
  inset:auto 0 0 0;
  padding:18px 16px 14px;
  color:#fff;
  background:none;
  pointer-events:none;
}

.rrm-card-cats,
.rrm-lightbox-cats{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.rrm-card-cat{
  display:inline-flex;
  align-items:center;
  padding:5px 10px;
  border-radius:999px;
  background:#4a3535;
  border:1px solid #4a3535;
  color:#fff;
  font:600 11px/1 "Avenir Next","Segoe UI",sans-serif;
  letter-spacing:.03em;
}

.rrm-lightbox-cat{
  display:inline-flex;
  align-items:center;
  padding:5px 10px;
  border-radius:999px;
  background:#4a3535;
  border:1px solid #4a3535;
  color:#fff;
  font:600 11px/1 "Avenir Next","Segoe UI",sans-serif;
  letter-spacing:.03em;
}

.rrm-card-caption{
  margin-top:9px;
  font:500 13px/1.45 "Avenir Next","Segoe UI",sans-serif;
  color:rgba(255,255,255,.96);
  text-shadow:0 1px 2px rgba(0,0,0,.28);
}

.rrm-card-actions{
  position:absolute;
  top:12px;
  right:12px;
  z-index:2;
  display:flex;
  gap:8px;
}

.rrm-card-action{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:40px;
  height:40px;
  padding:0;
  border:1px solid rgba(255,255,255,.2);
  border-radius:999px;
  color:#fff;
  background:rgba(17,22,16,.68);
  backdrop-filter:blur(10px);
  cursor:pointer;
  transition:transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}

.rrm-card-action:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 22px rgba(20,16,13,.24);
}

.rrm-card-action-delete{
  background:rgba(74,53,53,.88);
}

.rrm-card-action i{
  font-size:14px;
}

.rrm-empty{
  margin-top:24px;
  padding:28px;
  border:1px dashed rgba(31,42,31,.18);
  border-radius:24px;
  background:rgba(255,255,255,.74);
  color:var(--rrm-muted);
  font:500 15px/1.6 "Avenir Next","Segoe UI",sans-serif;
}

.rrm-lightbox,
.rrm-modal{
  position:fixed;
  inset:0;
  z-index:1000;
  display:none;
}

.rrm-lightbox[aria-hidden="false"],
.rrm-modal[aria-hidden="false"]{
  display:block;
}

.rrm-modal{
  overflow-y:auto;
  padding:12px 0;
}

.rrm-lightbox-backdrop,
.rrm-modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(14,17,13,.68);
  backdrop-filter:blur(10px);
}

.rrm-lightbox-panel,
.rrm-modal-panel{
  position:relative;
  z-index:1;
  width:min(1100px, calc(100% - 24px));
  margin:24px auto;
  border-radius:28px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(14,18,13,.94);
  color:#fff;
  box-shadow:0 28px 60px rgba(0,0,0,.34);
}

.rrm-modal-panel{
  width:min(860px, calc(100% - 24px));
  display:flex;
  flex-direction:column;
  max-height:calc(100vh - 48px);
  overflow:hidden;
  background:var(--rrm-panel);
  color:var(--rrm-ink);
}

.rrm-modal-panel-wide{
  width:min(1040px, calc(100% - 24px));
}

.rrm-x{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:42px;
  height:42px;
  border:0;
  border-radius:999px;
  background:rgba(255,255,255,.1);
  color:inherit;
  cursor:pointer;
}

.rrm-modal-head,
.rrm-modal-body{
  padding:20px;
}

.rrm-modal-head{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding-bottom:0;
}

.rrm-modal-body{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
}

.rrm-modal-title{
  font:700 28px/1.05 "Iowan Old Style","Palatino Linotype","Book Antiqua",Georgia,serif;
}

.rrm-modal-copy{
  margin:0 0 16px;
  color:var(--rrm-muted);
  font:500 14px/1.55 "Avenir Next","Segoe UI",sans-serif;
}

.rrm-dropzone{
  position:relative;
  padding:26px;
  border:1px dashed rgba(31,42,31,.2);
  border-radius:24px;
  background:linear-gradient(180deg, rgba(255,255,255,.82), rgba(247,242,234,.94));
  text-align:center;
  cursor:pointer;
}

.rrm-dropzone.is-over{
  border-color:var(--rrm-accent);
  background:linear-gradient(180deg, rgba(220,231,197,.86), rgba(255,255,255,.96));
}

.rrm-dropzone-title{
  font:700 20px/1.1 "Iowan Old Style","Palatino Linotype","Book Antiqua",Georgia,serif;
}

.rrm-dropzone-sub{
  margin-top:8px;
  color:var(--rrm-muted);
  font:500 14px/1.5 "Avenir Next","Segoe UI",sans-serif;
}

.rrm-file-input{
  position:absolute;
  inset:0;
  opacity:0;
  cursor:pointer;
}

.rrm-upload-empty,
.rrm-upload-files{
  margin-top:16px;
}

.rrm-upload-files{
  display:grid;
  gap:10px;
  max-height:min(38vh, 380px);
  overflow-y:auto;
  padding-right:4px;
}

.rrm-upload-file{
  display:flex;
  align-items:flex-start;
  gap:14px;
  padding:12px 14px;
  border-radius:16px;
  background:#fff;
  border:1px solid rgba(31,42,31,.08);
  font:600 13px/1.3 "Avenir Next","Segoe UI",sans-serif;
}

.rrm-upload-file.is-preparing,
.rrm-upload-file.is-uploading{
  border-color:rgba(92,122,47,.26);
  box-shadow:0 10px 22px rgba(92,122,47,.08);
}

.rrm-upload-file.is-done{
  border-color:rgba(64,128,64,.2);
}

.rrm-upload-file.is-failed{
  border-color:rgba(162,59,42,.22);
  box-shadow:0 10px 22px rgba(162,59,42,.08);
}

.rrm-upload-file-main{
  flex:1 1 auto;
  min-width:0;
}

.rrm-upload-file-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
}

.rrm-upload-name{
  min-width:0;
  overflow-wrap:anywhere;
}

.rrm-upload-status{
  flex:0 0 auto;
  color:var(--rrm-accent-deep);
}

.rrm-upload-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px 14px;
  margin-top:6px;
}

.rrm-upload-size{
  color:var(--rrm-muted);
}

.rrm-upload-error{
  color:var(--rrm-danger);
}

.rrm-upload-file-progress{
  overflow:hidden;
  height:8px;
  margin-top:10px;
  border-radius:999px;
  background:rgba(31,42,31,.08);
}

.rrm-upload-file-bar{
  width:0;
  height:100%;
  border-radius:999px;
  background:linear-gradient(135deg, var(--rrm-accent), #87a64f);
  transition:width .12s linear, background .16s ease;
}

.rrm-upload-file.is-done .rrm-upload-file-bar{
  background:linear-gradient(135deg, #5e9a57, #3c7a47);
}

.rrm-upload-file.is-failed .rrm-upload-file-bar{
  background:linear-gradient(135deg, #c25f4a, var(--rrm-danger));
}

.rrm-upload-progress{
  overflow:hidden;
  height:12px;
  margin-top:16px;
  border-radius:999px;
  background:rgba(31,42,31,.08);
}

.rrm-upload-bar{
  width:0;
  height:100%;
  border-radius:999px;
  background:linear-gradient(135deg, var(--rrm-accent), #87a64f);
  transition:width .12s linear;
}

.rrm-form-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:18px;
}

#rrmUploadModal .rrm-form-actions{
  position:sticky;
  bottom:0;
  padding-top:14px;
  background:linear-gradient(180deg, rgba(248,245,239,0), rgba(248,245,239,.94) 26%, var(--rrm-panel) 100%);
}

.rrm-input{
  width:100%;
  min-height:46px;
  padding:12px 14px;
  border:1px solid rgba(31,42,31,.14);
  border-radius:16px;
  background:#fff;
  color:var(--rrm-ink);
}

.rrm-inputarea{
  min-height:132px;
  resize:vertical;
}

.rrm-photo-editor{
  display:grid;
  grid-template-columns:minmax(280px, 1.08fr) minmax(280px, .92fr);
  gap:20px;
}

.rrm-photo-preview{
  border-radius:24px;
  overflow:hidden;
  background:#ebe3d5;
  border:1px solid rgba(31,42,31,.08);
}

.rrm-photo-preview picture,
.rrm-photo-preview img{
  display:block;
  width:100%;
  height:100%;
}

.rrm-photo-preview img{
  object-fit:cover;
}

.rrm-photo-fields{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.rrm-fieldlabel{
  display:block;
  margin-bottom:8px;
  font:700 12px/1 "Avenir Next","Segoe UI",sans-serif;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--rrm-muted);
}

.rrm-photo-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.rrm-btn-danger{
  color:#fff;
  border-color:var(--rrm-danger);
  background:linear-gradient(135deg, #b24a37, var(--rrm-danger));
}

.rrm-category-form{
  display:grid;
  gap:12px;
}

.rrm-category-list{
  display:grid;
  gap:10px;
}

.rrm-category-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:13px 14px;
  border-radius:18px;
  border:1px solid rgba(31,42,31,.08);
  background:#fff;
  cursor:grab;
}

.rrm-category-item.is-dragging{
  opacity:.55;
}

.rrm-category-item.is-drop-target{
  border-color:var(--rrm-accent);
  box-shadow:0 0 0 3px rgba(92,122,47,.12);
}

.rrm-category-name{
  font:700 14px/1.25 "Avenir Next","Segoe UI",sans-serif;
}

.rrm-category-actions{
  display:flex;
  gap:8px;
}

.rrm-catbtn{
  min-height:36px;
  padding:8px 12px;
  border-radius:999px;
}

.rrm-lightbox-panel{
  padding:18px;
}

.rrm-lightbox-body{
  display:grid;
  grid-template-columns:56px minmax(0, 1fr) 56px;
  align-items:center;
  gap:12px;
}

.rrm-lightbox-stage{
  overflow:hidden;
  border-radius:22px;
  background:#0f140f;
}

.rrm-lightbox-stage picture,
.rrm-lightbox-stage img{
  display:block;
  width:100%;
  max-height:72vh;
}

.rrm-lightbox-stage img{
  object-fit:contain;
}

.rrm-lbnav{
  width:56px;
  height:56px;
  border:0;
  border-radius:999px;
  color:#fff;
  background:rgba(255,255,255,.1);
  cursor:pointer;
}

.rrm-lightbox-meta{
  display:grid;
  gap:12px;
  padding:16px 6px 4px;
}

.rrm-lightbox-caption{
  color:rgba(255,255,255,.82);
  font:500 15px/1.6 "Avenir Next","Segoe UI",sans-serif;
}

body.rrm-lock{
  overflow:hidden;
}

@media (max-width: 980px){
  .rrm-body-inner{
    padding:12px 12px 72px;
  }

  .rrm-catbar{
    justify-content:flex-start;
    padding:6px 50px;
    gap:6px;
  }

  .rrm-grid{
    column-width:260px;
    column-gap:14px;
  }

  .rrm-card{
    margin-bottom:14px;
    border-radius:20px;
  }

  .rrm-photo-editor{
    grid-template-columns:minmax(0, 1fr);
  }

  .rrm-lightbox-body{
    grid-template-columns:1fr;
  }

  .rrm-lbnav{
    position:absolute;
    top:calc(50% - 28px);
    z-index:2;
  }

  .rrm-lbnav-prev{
    left:20px;
  }

  .rrm-lbnav-next{
    right:20px;
  }
}

@media (max-width: 640px){
  .rrm-catbar,
  .rrm-chipset{
    gap:8px;
  }

  .rrm-catbar{
    padding:6px 50px;
  }

  .rrm-chip{
    min-height:36px;
    padding:8px 12px;
    font-size:12px;
  }

  .rrm-catlink{
    min-height:34px;
    padding:6px 10px;
    border:1px solid rgba(255,255,255,.22);
    border-right:1px solid rgba(255,255,255,.22);
    border-radius:999px;
    background:rgba(255,255,255,.06);
  }

  .rrm-catlink:last-child{
    border-right:1px solid rgba(255,255,255,.22);
  }

  .rrm-catname{
    font-size:11px;
    letter-spacing:.02em;
  }

  .rrm-modal-head,
  .rrm-modal-body{
    padding:16px;
  }

  .rrm-lightbox-panel,
  .rrm-modal-panel,
  .rrm-modal-panel-wide{
    width:min(100%, calc(100% - 12px));
    margin:10px auto;
    border-radius:22px;
  }

  .rrm-modal-panel{
    max-height:calc(100vh - 20px);
  }
}
