/* Interactive 12-page visual arranger and three-sheet fold preview.
 * Strictly scoped to the Gala Page Studio; does not change the public booklet. */
.ugle12-arranger,
.ugle12-arranger *,
.ugle12-arranger *:before,
.ugle12-arranger *:after { box-sizing:border-box; }
.ugle12-arranger {
  width:100%;max-width:100%;min-width:0;
  margin:15px 0 25px;padding:18px 18px 16px;
  background:linear-gradient(135deg,#fff9eb,#fffdf8 60%,#f5f1e9);
  color:#223b51;border:1px solid #d4b981;border-radius:13px;
  box-shadow:0 7px 20px rgba(14,35,50,.08);
}
.ugle12-arranger-heading,.ugle12-imposition-heading {
  display:flex;justify-content:space-between;align-items:center;gap:15px;
  flex-wrap:wrap;
}
.ugle12-arranger-heading > div {flex:1 1 300px;min-width:0}
.ugle12-arranger-heading span,.ugle12-imposition-heading span{
  display:block;margin-bottom:5px;
  color:#9c6d2d;font-size:10px;font-weight:950;letter-spacing:.12em;
}
.ugle12-arranger-heading h3,.ugle12-imposition-heading h3{
  margin:0 0 5px!important;color:#203950!important;
  font:700 clamp(19px,2.4vw,25px)/1.22 Georgia,'Times New Roman',serif!important;
}
.ugle12-arranger-heading p,.ugle12-imposition-heading p {
  margin:0!important;
  color:#52687b;font-size:12px;line-height:1.56;
}
.ugle12-arranger a.ugle12-arranger-proof{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:44px;max-width:100%;padding:10px 14px;
  border-radius:9px;border:1px solid #a88a58;
  background:#1b3b57!important;color:#fff5dc!important;
  -webkit-text-fill-color:#fff5dc!important;
  text-decoration:none!important;font-size:12px;font-weight:850;text-align:center;
}
.ugle12-arranger-saved{
  margin:13px 0 6px;padding:11px 12px;
  border:1px solid #a9ccaf;border-radius:8px;
  background:#eef8ef;color:#235339;font-size:12px;font-weight:850;
}
.ugle12-arrange-reading{
  display:grid;grid-template-columns:repeat(6,minmax(0,1fr));
  gap:9px;width:100%;margin:18px 0 16px;
}
.ugle12-arrange-card {
  display:flex;flex-direction:column;align-items:center;
  width:100%;max-width:100%;min-width:0;
  min-height:224px;padding:10px 8px!important;
  border:1px solid #d5b980!important;border-radius:10px!important;
  background:#fffdfa!important;color:#263f55!important;
  -webkit-text-fill-color:#263f55!important;
  text-align:center;gap:7px;
  cursor:grab;touch-action:manipulation;
  box-shadow:0 2px 8px rgba(27,47,62,.06);
  transition:border-color .13s ease,transform .13s ease,box-shadow .13s ease;
}
.ugle12-arrange-card:hover {
  border-color:#bc8e3d!important;
  box-shadow:0 5px 14px rgba(34,45,54,.13);
}
.ugle12-arrange-card:focus-visible {
  outline:3px solid #ba8c46!important;outline-offset:3px!important;
}
.ugle12-arrange-card.is-locked {
  cursor:default;
  background:#f1f0ee!important;
  border-color:#c6c7ca!important;
}
.ugle12-arrange-card.is-selected {
  border:2px solid #ad7523!important;
  background:#fff3d6!important;
  box-shadow:0 0 0 3px rgba(182,129,36,.2);
}
.ugle12-arrange-card.is-dragging {opacity:.45;transform:scale(.97)}
.ugle12-arrange-card.is-drop-target {
  border:2px dashed #986424!important;
  background:#f9e8bb!important;
  transform:translateY(-3px);
}
.ugle12-arrange-card-number {
  display:flex;align-items:center;justify-content:center;gap:3px;
  width:100%;white-space:nowrap;
  font-size:10px;font-weight:950;letter-spacing:.11em;
  line-height:1.3;color:#9d6e2f!important;-webkit-text-fill-color:#9d6e2f!important;
}
.ugle12-arrange-mini {
  position:relative;display:flex;align-items:stretch;justify-content:center;
  width:min(100%,100px);min-height:0;
  aspect-ratio:5.5/8.5;max-height:155px;
  overflow:hidden;border:1px solid #c8b28d;border-radius:3px;
  background:#fffaf0;
  box-shadow:0 2px 5px rgba(28,47,64,.13);
}
.ugle12-arrange-mini:before{
  content:"";position:absolute;top:0;bottom:0;left:0;
  width:2px;background:rgba(127,94,45,.5);z-index:1;
}
.ugle12-arrange-mini img{
  display:block;width:100%!important;height:100%!important;
  max-width:100%!important;max-height:100%!important;
  object-fit:cover!important;
}
.ugle12-arrange-mini-text {
  display:flex;flex-direction:column;
  align-items:center;justify-content:flex-start;gap:7px;
  width:100%;padding:13px 8px;
  background:radial-gradient(circle at top,rgba(189,147,74,.15),transparent 60%),#fffaf0;
}
.ugle12-arrange-mini-text b{
  display:block;line-height:1.18;font:700 10px/1.24 Georgia,serif!important;
  text-align:center;color:#25405a!important;
  -webkit-text-fill-color:#25405a!important;
  overflow-wrap:anywhere;
}
.ugle12-arrange-mini-text i {
  display:block;height:2px;width:80%;
  background:#dfd2bb;border-radius:1px;
}
.ugle12-arrange-mini-text i:last-child {width:53%}
.ugle12-arrange-card-title{
  display:-webkit-box;
  -webkit-line-clamp:2;-webkit-box-orient:vertical;
  max-width:100%;min-height:29px;
  font-size:11px!important;font-weight:850!important;line-height:1.34!important;
  text-align:center;overflow:hidden;overflow-wrap:anywhere;
  color:#1e354b!important;-webkit-text-fill-color:#1e354b!important;
}
.ugle12-arrange-card small{
  display:block;font-size:9px;line-height:1.35;
  color:#617487!important;-webkit-text-fill-color:#617487!important;
}
.ugle12-arrange-toolbar{
  display:flex;align-items:center;justify-content:space-between;
  gap:10px;flex-wrap:wrap;padding:0 0 10px;
}
.ugle12-arrange-actions{
  display:flex;gap:6px;flex-wrap:wrap;
}
.ugle12-arrange-toolbar button{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:40px;padding:9px 12px!important;
  border:1px solid #c6b58d!important;border-radius:8px!important;
  background:#fff!important;color:#2c4155!important;
  -webkit-text-fill-color:#2c4155!important;
  font-size:11px!important;font-weight:850!important;
  line-height:1.25!important;cursor:pointer;
}
.ugle12-arrange-toolbar button.ugle12-arrange-save{
  background:#1a3b57!important;color:#fff3d9!important;
  -webkit-text-fill-color:#fff3d9!important;
  border-color:#bc9151!important;min-width:170px;
}
.ugle12-arrange-toolbar button:disabled{
  cursor:not-allowed;opacity:.48;box-shadow:none!important;
}
.ugle12-arrange-feedback{
  min-height:24px;margin:0!important;
  padding:7px 10px;background:#f6f2e9;border-radius:7px;
  color:#576c80!important;font-size:11px!important;
  line-height:1.45!important;
}
.ugle12-arrange-feedback.is-unsaved{
  background:#fff0ce;color:#7d5526!important;
  font-weight:800!important;
}

/* Physical paper sheets with correct saddle-stitch imposition. */
.ugle12-imposition{
  border-top:1px solid #dfccaa;
  padding-top:16px;margin-top:18px;
}
.ugle12-imposition-heading{
  gap:10px;
}
.ugle12-imposition-heading > div{flex:0 0 auto}
.ugle12-imposition-heading p{flex:1 1 280px;max-width:590px}
.ugle12-imposition-grid{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;margin:15px 0 12px;
}
.ugle12-sheet-card{
  min-width:0;padding:13px 12px 15px;
  background:#fff;border:1px solid #ddc8a6;
  border-radius:11px;
  box-shadow:0 4px 13px rgba(25,45,65,.05);
}
.ugle12-sheet-header{
  display:flex;justify-content:space-between;align-items:center;gap:6px;
  margin-bottom:11px;padding-bottom:8px;
  border-bottom:1px solid #e8dcc7;
}
.ugle12-sheet-header strong{
  font-size:15px;color:#1f3b53;
}
.ugle12-sheet-header small{
  font-size:10px;font-weight:900;letter-spacing:.1em;
  color:#92703b;
}
.ugle12-sheet-face + .ugle12-sheet-face{margin-top:12px}
.ugle12-sheet-face > span {
  display:block;margin-bottom:5px;
  color:#52697c;font-size:10px;font-weight:850;
}
.ugle12-sheet-spread {
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  width:100%;min-width:0;
  aspect-ratio:11/8.5;
  padding:6px;background:#ede6d9;
  border:1px solid #baaa90;border-radius:6px;gap:0;
}
.ugle12-impose-cell{
  display:flex;flex-direction:column;justify-content:center;align-items:center;
  min-width:0;padding:6px 5px;gap:3px;
  background:#fffdf9;border:1px solid #d9d0be;
  color:#2d4357;text-align:center;overflow:hidden;
}
.ugle12-impose-cell:first-child{
  border-right:2px dashed #bf9254;border-radius:3px 0 0 3px;
}
.ugle12-impose-cell:last-child{border-radius:0 3px 3px 0}
.ugle12-impose-cell.is-cover{background:#233a50}
.ugle12-impose-cell strong{
  display:block;font:700 clamp(18px,2vw,26px)/1 Georgia,serif!important;
  color:#243a51!important;-webkit-text-fill-color:#243a51!important;
}
.ugle12-impose-cell.is-cover strong{
  color:#f5d899!important;-webkit-text-fill-color:#f5d899!important;
}
.ugle12-impose-cell small{
  display:block;font-size:clamp(9px,.85vw,11px);
  font-weight:700;line-height:1.2;
  color:#53677a!important;-webkit-text-fill-color:#53677a!important;
  overflow-wrap:anywhere;max-height:4.6em;overflow:hidden;
}
.ugle12-impose-cell.is-cover small{
  color:#fff6dd!important;-webkit-text-fill-color:#fff6dd!important;
}
.ugle12-impose-note{
  margin:13px 0 5px!important;padding:11px 12px;
  border-radius:8px;background:#f3e9d7;
  color:#40566c!important;font-size:12px!important;line-height:1.56!important;
}
.ugle12-arrange-edit-tip{
  margin:12px 0 0!important;font-size:12px!important;
  color:#596d7e!important;
}
@media(max-width:1100px){
 .ugle12-arrange-reading{grid-template-columns:repeat(4,minmax(0,1fr))}
 .ugle12-imposition-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:680px){
 .ugle12-arranger{padding:14px 12px}
 .ugle12-arrange-reading{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
 .ugle12-arrange-card{min-height:190px;padding:7px 5px!important;gap:5px}
 .ugle12-arrange-mini{max-width:95px;max-height:124px}
 .ugle12-arrange-card-title{font-size:10px!important}
 .ugle12-arrange-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}
 .ugle12-arrange-toolbar button.ugle12-arrange-save{width:100%}
 .ugle12-imposition-grid{grid-template-columns:1fr}
 .ugle12-imposition-heading{align-items:flex-start}
 .ugle12-sheet-card{max-width:430px;width:100%;margin:auto}
}
@media(max-width:390px){
 .ugle12-arrange-reading{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(prefers-reduced-motion:reduce){
 .ugle12-arrange-card{transition:none!important;transform:none!important}
}
@media print {
 .ugle12-arranger{display:none!important}
}