/* Kingdoms of Armenia: image framing and the requested mobile button layouts. */
.history-master-article .kingdom-image-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:22px 0 28px}
.history-master-article .kingdom-image-gallery.kingdom-image-single{grid-template-columns:1fr}
.history-master-article .kingdom-image-frame{margin:0;min-width:0;background:#f5f5f4;border:1px solid #dedbd4;border-radius:8px;overflow:hidden;display:flex;flex-direction:column}
.history-master-article .kingdom-image-frame img{display:block;width:100%;height:220px;object-fit:contain;background:#efeeeb}
.history-master-article .kingdom-image-single img{height:auto;max-height:520px}
.history-master-article .kingdom-image-frame figcaption{font-size:.85rem;padding:10px 12px;color:#344155;overflow-wrap:anywhere}
@media(max-width:767px){
 html body article.history-master-article nav.hye-master-nav .master-nav-right{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;width:100%!important;max-width:100%!important;flex-direction:unset!important;align-items:stretch!important}
 html body article.history-master-article nav.hye-master-nav .master-nav-right>a.hye-master-button{display:flex!important;align-items:center!important;justify-content:center!important;grid-column:auto!important;grid-row:auto!important;order:0!important;width:100%!important;min-width:0!important;max-width:100%!important;margin:0!important;box-sizing:border-box!important;float:none!important;flex:none!important}
 html body article.history-master-article nav.hye-master-nav-top.first-part .christianity-next{grid-column:1/-1!important;grid-row:1!important}
 html body article.history-master-article nav.hye-master-nav-top.first-part .christianity-start-over{grid-column:1/-1!important;grid-row:2!important}
 html body article.history-master-article nav.hye-master-nav-bottom.first-part .christianity-next{grid-column:1!important;grid-row:1!important}
 html body article.history-master-article nav.hye-master-nav-bottom.first-part .top-button{grid-column:2!important;grid-row:1!important}
 html body article.history-master-article nav.hye-master-nav-bottom.first-part .christianity-start-over{grid-column:1/-1!important;grid-row:2!important}
 html body article.history-master-article nav.hye-master-nav-top:not(.first-part) .christianity-back{grid-column:1!important;grid-row:1!important}
 html body article.history-master-article nav.hye-master-nav-top:not(.first-part) .christianity-next{grid-column:2!important;grid-row:1!important}
 html body article.history-master-article nav.hye-master-nav-top:not(.first-part) .christianity-start-over{grid-column:1/-1!important;grid-row:2!important}
 html body article.history-master-article nav.hye-master-nav-bottom:not(.first-part) .christianity-back{grid-column:1!important;grid-row:1!important}
 html body article.history-master-article nav.hye-master-nav-bottom:not(.first-part) .christianity-next{grid-column:2!important;grid-row:1!important}
 html body article.history-master-article nav.hye-master-nav-bottom:not(.first-part) .top-button{grid-column:1/-1!important;grid-row:2!important}
 html body article.history-master-article nav.hye-master-nav-bottom:not(.first-part) .christianity-start-over{grid-column:1/-1!important;grid-row:3!important}
 html body article.history-master-article nav.hye-master-nav.last-part .master-nav-right{grid-template-columns:1fr!important}
 html body article.history-master-article nav.hye-master-nav.last-part .master-nav-right>a.hye-master-button{grid-column:1/-1!important}
 html body article.history-master-article nav.hye-master-nav.last-part .christianity-back{grid-row:1!important}
 html body article.history-master-article nav.hye-master-nav-top.last-part .christianity-start-over{grid-row:2!important}
 html body article.history-master-article nav.hye-master-nav-bottom.last-part .top-button{grid-row:2!important}
 html body article.history-master-article nav.hye-master-nav-bottom.last-part .christianity-start-over{grid-row:3!important}
 .history-master-article .kingdom-image-gallery{grid-template-columns:1fr}
 .history-master-article .kingdom-image-frame img{height:auto;max-height:380px}
}


/* Kingdoms of Armenia mobile navigation — matches the Armenian Genocide reference. */
@media screen and (max-width:767px){
 html body article.history-master-article nav.hye-master-nav{box-sizing:border-box!important;max-width:100%!important}
 html body article.history-master-article nav.hye-master-nav .master-nav-page{display:block!important;width:100%!important;text-align:right!important;margin-bottom:14px!important;color:#a68b42!important;font-weight:800!important}
 html body article.history-master-article nav.hye-master-nav .master-nav-right{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;width:100%!important;max-width:100%!important;align-items:stretch!important;justify-content:stretch!important;flex-wrap:unset!important}
 html body article.history-master-article nav.hye-master-nav .master-nav-right>a.hye-master-button{box-sizing:border-box!important;display:flex!important;align-items:center!important;justify-content:center!important;text-align:center!important;min-width:0!important;width:100%!important;max-width:none!important;min-height:62px!important;padding:15px 9px!important;margin:0!important;border-radius:15px!important;font-weight:800!important;line-height:1.2!important;white-space:normal!important;float:none!important;flex:none!important;grid-column:auto!important;grid-row:auto!important}
 html body article.history-master-article nav.hye-master-nav .master-nav-right>a.christianity-next,
 html body article.history-master-article nav.hye-master-nav .master-nav-right>a.christianity-back{background:#b7a052!important;color:#fff!important;-webkit-text-fill-color:#fff!important;border-color:transparent!important}
 html body article.history-master-article nav.hye-master-nav .master-nav-right>a.top-button{background:#606775!important;color:#fff!important;-webkit-text-fill-color:#fff!important;border-color:transparent!important}
 html body article.history-master-article nav.hye-master-nav .master-nav-right>a.christianity-start-over{background:#2c3445!important;color:#fff!important;-webkit-text-fill-color:#fff!important;border-color:transparent!important}
 html body article.history-master-article nav.hye-master-nav-top.first-part .master-nav-right>a.christianity-next{grid-column:1/-1!important;grid-row:1!important}
 html body article.history-master-article nav.hye-master-nav-top.first-part .master-nav-right>a.christianity-start-over{grid-column:1/-1!important;grid-row:2!important}
 html body article.history-master-article nav.hye-master-nav-bottom.first-part .master-nav-right>a.christianity-next{grid-column:1!important;grid-row:1!important}
 html body article.history-master-article nav.hye-master-nav-bottom.first-part .master-nav-right>a.top-button{grid-column:2!important;grid-row:1!important}
 html body article.history-master-article nav.hye-master-nav-bottom.first-part .master-nav-right>a.christianity-start-over{grid-column:1/-1!important;grid-row:2!important}
 html body article.history-master-article nav.hye-master-nav-top:not(.first-part) .master-nav-right>a.christianity-back{grid-column:1!important;grid-row:1!important}
 html body article.history-master-article nav.hye-master-nav-top:not(.first-part) .master-nav-right>a.christianity-next{grid-column:2!important;grid-row:1!important}
 html body article.history-master-article nav.hye-master-nav-top:not(.first-part) .master-nav-right>a.christianity-start-over{grid-column:1/-1!important;grid-row:2!important}
 html body article.history-master-article nav.hye-master-nav-bottom:not(.first-part) .master-nav-right>a.christianity-back{grid-column:1!important;grid-row:1!important}
 html body article.history-master-article nav.hye-master-nav-bottom:not(.first-part) .master-nav-right>a.christianity-next{grid-column:2!important;grid-row:1!important}
 html body article.history-master-article nav.hye-master-nav-bottom:not(.first-part) .master-nav-right>a.top-button{grid-column:1/-1!important;grid-row:2!important}
 html body article.history-master-article nav.hye-master-nav-bottom:not(.first-part) .master-nav-right>a.christianity-start-over{grid-column:1/-1!important;grid-row:3!important}
 /* Last part has no NEXT: preserve available BACK, TOP, START OVER controls. */
 html body article.history-master-article nav.hye-master-nav.last-part .master-nav-right>a.christianity-back{grid-column:1/-1!important;grid-row:1!important}
 html body article.history-master-article nav.hye-master-nav-top.last-part .master-nav-right>a.christianity-start-over{grid-column:1/-1!important;grid-row:2!important}
 html body article.history-master-article nav.hye-master-nav-bottom.last-part .master-nav-right>a.top-button{grid-column:1/-1!important;grid-row:2!important}
 html body article.history-master-article nav.hye-master-nav-bottom.last-part .master-nav-right>a.christianity-start-over{grid-column:1/-1!important;grid-row:3!important}
}

/* Kingdoms of Armenia — compact desktop/iPad controls matching Genocide reference.
   Mobile <=767px intentionally retains the large, stacked button layout. */
@media screen and (min-width:768px){
 html body article.history-master-article nav.hye-master-nav{display:flex!important;align-items:center!important;justify-content:flex-end!important;flex-wrap:wrap!important;gap:8px!important}
 html body article.history-master-article nav.hye-master-nav .master-nav-page{flex:0 0 100%!important;width:100%!important;text-align:right!important;margin:0 0 8px!important}
 html body article.history-master-article nav.hye-master-nav .master-nav-right{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:flex-end!important;gap:9px!important;margin-left:auto!important;width:auto!important;max-width:100%!important}
 html body article.history-master-article nav.hye-master-nav .master-nav-right>a.hye-master-button{display:inline-flex!important;flex:0 0 auto!important;width:auto!important;max-width:none!important;min-width:0!important;min-height:48px!important;height:48px!important;padding:0 16px!important;margin:0!important;border-radius:9px!important;font-size:12px!important;font-weight:800!important;line-height:1!important;white-space:nowrap!important;align-items:center!important;justify-content:center!important;box-sizing:border-box!important}
 html body article.history-master-article nav.hye-master-nav .master-nav-right>a.christianity-back{order:1!important;background:#bba347!important;color:#fff!important}
 html body article.history-master-article nav.hye-master-nav .master-nav-right>a.christianity-start-over{order:2!important;background:#2c3445!important;color:#fff!important}
 html body article.history-master-article nav.hye-master-nav .master-nav-right>a.christianity-next{order:3!important;background:#bba347!important;color:#fff!important}
 html body article.history-master-article nav.hye-master-nav .master-nav-right>a.top-button{order:4!important;background:#606775!important;color:#fff!important}
}

/* Match Armenian Genocide reference: part count shares the desktop navigation row,
   positioned at its left edge; on phones it sits above the buttons at right. */
@media screen and (min-width:768px){
 html body article.history-master-article nav.hye-master-nav{flex-wrap:nowrap!important;justify-content:space-between!important;align-items:center!important;gap:12px!important}
 html body article.history-master-article nav.hye-master-nav .master-nav-page{display:block!important;flex:0 0 auto!important;width:auto!important;min-width:0!important;text-align:left!important;margin:0 auto 0 0!important;white-space:nowrap!important;font-size:13px!important}
 html body article.history-master-article nav.hye-master-nav .master-nav-right{flex:0 1 auto!important;margin-left:auto!important}
}
@media screen and (max-width:767px){
 html body article.history-master-article nav.hye-master-nav{flex-direction:column!important;align-items:stretch!important}
 html body article.history-master-article nav.hye-master-nav .master-nav-page{display:block!important;flex:0 0 auto!important;width:100%!important;text-align:right!important;margin:0 0 8px!important;align-self:stretch!important}
}

/* Equal-sized square images in multi-image galleries, without distortion or cropping. */
html body .history-master-article .kingdom-image-gallery:not(.kingdom-image-single){grid-auto-rows:auto;align-items:stretch}
html body .history-master-article .kingdom-image-gallery:not(.kingdom-image-single) .kingdom-image-frame{min-width:0;height:100%;display:flex;flex-direction:column}
html body .history-master-article .kingdom-image-gallery:not(.kingdom-image-single) .kingdom-image-frame img{display:block!important;width:100%!important;height:auto!important;aspect-ratio:1 / 1!important;object-fit:contain!important;object-position:center!important;max-height:none!important;background:#efeeeb!important;flex:none!important}
html body .history-master-article .kingdom-image-gallery:not(.kingdom-image-single) .kingdom-image-frame figcaption{flex:1}

/* Match the Armenian Genocide reference page's mobile PART label sizing. */
@media screen and (max-width:767px){
 html body article.history-master-article nav.hye-master-nav .master-nav-page{font-size:clamp(19px,5vw,28px)!important;font-weight:800!important;line-height:1.2!important}
}

/* Mobile PART label: compact sizing matched to supplied Armenian Independence screenshot. */
@media screen and (max-width:767px){
 html body article.history-master-article nav.hye-master-nav .master-nav-page{font-size:14px!important;font-weight:800!important;line-height:1.3!important;letter-spacing:.5px!important;text-align:right!important;white-space:nowrap!important;}
}
