.rgm{border:0;padding:0;background:transparent;max-width:min(1060px,96vw);width:100%;max-height:96vh;overflow:visible}
.rgm::backdrop{background:rgba(10,42,87,.62);backdrop-filter:blur(3px)}
.rgm__card{position:relative;display:grid;grid-template-columns:minmax(0,1.5fr) minmax(280px,1fr);background:#fff;border:1px solid rgba(176,141,87,.7);border-radius:16px;box-shadow:0 40px 80px -30px rgba(0,0,0,.6);overflow:hidden;max-height:94vh}
.rgm__x{position:absolute;top:10px;right:12px;z-index:3;width:38px;height:38px;border-radius:50%;border:1px solid rgba(176,141,87,.7);background:#fff;color:#0a2a57;font-size:24px;line-height:1;cursor:pointer}
.rgm__stage{background:#f7f2e8;background-image:var(--rg-tile);background-size:96px 96px;padding:18px;display:flex;flex-direction:column;gap:12px;min-width:0}
.rgm__canvaswrap{position:relative;background:#fff;border:1px solid rgba(176,141,87,.5);border-radius:10px;overflow:hidden;display:flex;justify-content:center}
.rgm__canvas{display:block;max-width:100%;max-height:68vh;width:auto;height:auto;touch-action:none;cursor:default}
.rgm__canvas.is-drag{cursor:grabbing}
.rgm__canvas.is-over{cursor:grab}
.rgm__hint{position:absolute;left:50%;bottom:14px;transform:translateX(-50%);margin:0;padding:8px 16px;background:rgba(10,42,87,.88);color:#fff;border-radius:14px;font-family:"Marcellus",Georgia,serif;font-size:1.3rem;letter-spacing:.06em;text-align:center;width:max-content;max-width:88%;line-height:1.35;pointer-events:none}
.rgm__hint[hidden]{display:none}
.rgm__thumbs{display:flex;gap:8px;overflow-x:auto;padding-bottom:2px}
.rgm__thumb{flex:0 0 auto;width:60px;height:60px;padding:0;border:2px solid transparent;border-radius:8px;overflow:hidden;background:#fff;cursor:pointer}
.rgm__thumb img{width:100%;height:100%;object-fit:cover;display:block}
.rgm__thumb.is-on{border-color:#b8962e}
.rgm__panel{padding:34px 30px 28px;display:flex;flex-direction:column;gap:12px;overflow:auto}
.rgm__eyebrow{margin:0;font-family:"Marcellus",Georgia,serif;font-size:1.2rem;letter-spacing:.26em;text-transform:uppercase;color:#b8962e}
.rgm__title{margin:0;font-family:var(--rg-serif);font-weight:600;font-size:3.4rem;line-height:1.05;color:#0a2a57}
.rgm__lead{margin:0;color:#41506a;font-size:1.45rem;line-height:1.55}
.rgm__upload{display:block;cursor:pointer}
.rgm__upload input{position:absolute;opacity:0;width:1px;height:1px}
.rgm__upload span{display:block;text-align:center;padding:13px 18px;border:1px dashed #b8962e;border-radius:10px;background:#fffdf8;color:#0a2a57;font-family:"Marcellus",Georgia,serif;letter-spacing:.1em;text-transform:uppercase;font-size:1.3rem}
.rgm__upload:focus-within span,.rgm__upload:hover span{background:#f7f2e8}
.rgm__small{margin:0;color:#6a7690;font-size:1.2rem}
.rgm__ctl{display:flex;flex-direction:column;gap:12px;padding:14px 0 4px;border-top:1px solid rgba(176,141,87,.4)}
.rgm__ctl[hidden]{display:none}
.rgm__ctl label{display:flex;align-items:center;justify-content:space-between;gap:14px;font-family:"Marcellus",Georgia,serif;letter-spacing:.06em;color:#0a2a57;font-size:1.35rem}
.rgm__ctl input[type=range]{flex:1;max-width:180px;accent-color:#b8962e}
.rgm__check{justify-content:flex-start!important;gap:10px!important}
.rgm__check input{accent-color:#0a2a57;width:18px;height:18px}
.rgm__ghost{align-self:flex-start;background:none;border:0;padding:0;color:#0a2a57;text-decoration:underline;text-decoration-color:#b8962e;text-underline-offset:3px;cursor:pointer;font-size:1.3rem}
.rgm__dl{margin-top:4px;background:#0a2a57;color:#fff;border:0;padding:15px 20px;font-family:"Marcellus",Georgia,serif;letter-spacing:.16em;text-transform:uppercase;font-size:1.4rem;cursor:pointer;box-shadow:0 0 0 1px #0a2a57,0 0 0 4px #fff,0 0 0 5px #b8962e}
.rgm__dl:disabled{opacity:.4;cursor:not-allowed}
.rgm__quote,.rgm__pro{text-align:center;color:#0a2a57;text-decoration-color:#b8962e;text-underline-offset:3px;font-size:1.35rem}
.rgm__quote{font-weight:600;margin-top:6px}
.rgm__pro{color:#6a7690;font-size:1.2rem}
@media (max-width:749px){
  .rgm{max-width:100vw;max-height:100vh;height:100vh;margin:0}
  .rgm__card{grid-template-columns:1fr;border-radius:0;max-height:100vh;height:100vh;overflow:auto;grid-template-rows:auto auto}
  .rgm__canvas{max-height:46vh}
  .rgm__panel{padding:20px 18px 28px}
  .rgm__title{font-size:2.8rem}
  .rgm__hint{font-size:1.1rem;white-space:normal;text-align:center;width:80%}
}

.rgm__colors{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}
.rgm__clabel{font-family:"Marcellus",Georgia,serif;letter-spacing:.06em;color:#0a2a57;font-size:1.35rem}
.rgm__swatches{display:flex;align-items:center;gap:9px}
.rgm__sw{position:relative;width:30px;height:30px;padding:0;border-radius:50%;border:1px solid rgba(10,42,87,.35);cursor:pointer;display:block;overflow:hidden;box-shadow:0 0 0 2px #fff}
.rgm__sw.is-on{box-shadow:0 0 0 2px #fff,0 0 0 4px #b8962e}
.rgm__sw--white{background:#fff}
.rgm__sw--black{background:#111}
.rgm__sw--tone{background:linear-gradient(135deg,#8a7a63 50%,#5f5240 50%)}

.rgm__sw--eye{background:conic-gradient(#d94b4b,#e6b422,#4caf6a,#3b82c4,#8a55c4,#d94b4b);display:flex;align-items:center;justify-content:center}
.rgm__sw--eye input{position:absolute;inset:-4px;width:calc(100% + 8px);height:calc(100% + 8px);opacity:0;cursor:pointer;border:0;padding:0}
.rgm__sw--eye.is-on::before{content:"";position:absolute;right:2px;bottom:2px;width:11px;height:11px;border-radius:50%;background:var(--rgm-custom,#b8962e);border:1.5px solid #fff;z-index:2}
.rgm__sw--reset{background:#fff;display:flex;align-items:center;justify-content:center}
.rgm__sw--reset:hover{background:#f7f2e8}
.rgm__ctl [data-rgm-shadewrap][hidden]{display:none}
