/* Full-width necklace view with an optional overview of the complete avatar. */
@media(max-width:760px){
 /* Keep feedback from pushing the preview down after adding or removing a piece. */
 #selene-app[data-step=jewel]>.selene-status{display:block;height:26px;min-height:26px;margin:0;font-size:10px;line-height:13px;overflow-y:auto;overflow-wrap:anywhere}
 .selene-app.selene-mobile-focus[data-step=jewel] .selene-layout{padding-left:0;padding-right:0;padding-bottom:0;gap:0}
 .selene-app.selene-mobile-focus[data-step=jewel] .selene-preview{padding-top:0}
 .selene-app.selene-mobile-focus[data-step=jewel] .selene-stage-frame{width:100%;margin:0}
 .selene-app.selene-mobile-focus[data-step=jewel] .selene-stage{width:100%;max-width:none;max-height:none;height:clamp(240px,34svh,300px);aspect-ratio:auto;margin:0;overflow:hidden}
 .selene-camera-world{position:absolute;left:0;top:0;transform-origin:0 0}
 .selene-app.selene-mobile-focus .selene-camera-world>canvas{width:100%;height:100%;max-width:none;max-height:none}
 .selene-app.selene-mobile-focus[data-step=jewel] .selene-controls{width:100%;padding-top:0;padding-left:12px;padding-right:12px}
 .selene-app.selene-mobile-focus[data-step=jewel] .selene-category-heading{margin-top:0;margin-bottom:12px}
 .selene-app.selene-mobile-focus[data-step=jewel][data-category=charms] .selene-grid,.selene-app.selene-mobile-focus[data-step=jewel][data-category=beads] .selene-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px 8px}
 .selene-app.selene-mobile-focus[data-step=jewel] .selene-card-charm,.selene-app.selene-mobile-focus[data-step=jewel] .selene-card-bead,.selene-app.selene-mobile-focus[data-step=jewel] .selene-card-composition{padding:6px 2px}
 .selene-app.selene-mobile-focus[data-step=jewel] .selene-card-charm img,.selene-app.selene-mobile-focus[data-step=jewel] .selene-card-bead img,.selene-app.selene-mobile-focus[data-step=jewel] .selene-card-composition img{height:70px}
 .selene-app.selene-mobile-focus[data-step=jewel][data-category=charms] .selene-card>span,.selene-app.selene-mobile-focus[data-step=jewel][data-category=beads] .selene-card>span{display:flex;flex:1;align-items:center;justify-content:center;min-height:2.6em;font-size:calc(var(--selene-text-size,14px)*.857142857);line-height:1.3}
 .selene-app.selene-mobile-focus .selene-camera-actions{display:flex;justify-content:center;min-height:44px;margin:-4px 0 -6px;padding:0 12px}
 #selene-app.selene-mobile-focus .selene-camera-toggle,#selene-app.selene-mobile-focus .selene-camera-toggle:focus,#selene-app.selene-mobile-focus .selene-camera-toggle:active{position:relative;flex:0 0 auto;white-space:nowrap;font-size:calc(var(--selene-button-size,14px)*.785714286);line-height:1.45;font-weight:var(--selene-button-weight,500);min-height:44px;padding:8px 14px;border:0;border-radius:0;background:transparent;color:#8564a9;box-shadow:none}
 #selene-app.selene-mobile-focus .selene-camera-toggle:before{content:'';position:absolute;inset:8px 0;border:1px solid #8564a9;pointer-events:none}
 #selene-app.selene-mobile-focus .selene-camera-toggle:hover{background:transparent;color:#572685}
 #selene-app.selene-mobile-focus .selene-camera-toggle:hover:before{border-color:#572685}
 #selene-app.selene-mobile-focus .selene-camera-toggle:focus-visible{outline:2px solid #572985;outline-offset:2px}
}
/* Compact the selection panel while preserving the portrait dimensions. */
@media(max-width:760px){
 #selene-app[data-step=jewel] .selene-rail{min-height:60px}
 #selene-app[data-step=jewel] .selene-round-icon{width:44px;height:44px;min-width:44px}
 #selene-app[data-step=jewel] .selene-round-icon.is-current{width:56px;height:56px;min-width:56px}
 #selene-app[data-step=jewel] .selene-controls{padding-bottom:8px}
 #selene-app[data-step=jewel] .selene-category-heading{gap:4px;margin-top:0;margin-bottom:6px}
 #selene-app[data-step=jewel] .selene-category-title{font-size:calc(var(--selene-category-size,36px)*.68)!important;line-height:1.2}
 #selene-app[data-step=jewel] .selene-controls .selene-section-title{font-size:calc(var(--selene-subtitle-size,25px)*.8);margin:8px 0}
 #selene-app[data-step=jewel] .selene-gallery>.selene-grid{gap:6px 4px;margin:0 0 4px}
 #selene-app[data-step=jewel] .selene-card{gap:2px;padding:2px;font-size:calc(var(--selene-text-size,14px)*.8)!important;min-height:44px}
 #selene-app[data-step=jewel] .selene-card-charm img,#selene-app[data-step=jewel] .selene-card-bead img,#selene-app[data-step=jewel] .selene-card-composition img{height:40px}
 #selene-app[data-step=jewel][data-category=charms] .selene-card>span,#selene-app[data-step=jewel][data-category=beads] .selene-card>span{font-size:calc(var(--selene-text-size,14px)*.8);line-height:1.2;min-height:2.4em}
 #selene-app[data-step=jewel] .selene-card small{font-size:calc(var(--selene-text-size,14px)*.714285714)}
 #selene-app[data-step=jewel] .selene-card-base img{width:100%;max-width:180px;height:auto}
 #selene-app[data-step=jewel] .selene-card-chain img{max-width:180px;height:auto}
 #selene-app[data-step=jewel] .selene-ring-options{gap:6px;margin:4px 0}
 #selene-app[data-step=jewel] .selene-ring-options img{height:36px}
 #selene-app[data-step=jewel] .selene-pager{margin:2px 0}
 #selene-app[data-step=jewel] .selene-metal{gap:16px;margin:4px 0}
 #selene-app[data-step=jewel] .selene-metal button{width:44px;height:44px;min-width:44px}
 #selene-app[data-step=jewel] .selene-palette{margin:0}
 #selene-app[data-step=jewel] .selene-palette summary{font-size:calc(var(--selene-text-size,14px)*.857142857);padding:6px 0}
 #selene-app[data-step=jewel] .selene-palette .selene-swatches{gap:6px;margin:6px 0;padding:3px}
 #selene-app[data-step=jewel] .selene-palette .selene-swatches button{width:28px;height:28px;min-width:28px}
 #selene-app[data-step=jewel] .selene-chosen-details{margin-top:6px}
 #selene-app[data-step=jewel] .selene-chosen-details summary{font-size:calc(var(--selene-text-size,14px)*.8);padding:6px 0}
}

/* Shared gold/silver swatches for choker rings, chains, charms and beads. */
.selene-app .selene-controls .selene-category-instructions{margin:4px 0 12px;white-space:pre-line;overflow-wrap:anywhere;font-size:var(--selene-text-size,14px);line-height:1.5;text-align:center}
@media(max-width:760px){.selene-app .selene-controls .selene-category-instructions{margin:4px 0 8px;font-size:calc(var(--selene-text-size,14px)*.857142857)}}
#selene-app[data-step=jewel]:is([data-category=chain],[data-category=charms],[data-category=beads]) .selene-category-heading{margin-bottom:4px}
#selene-app[data-step=jewel] .selene-finish-top{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:8px;margin:0 0 8px;min-height:44px}
#selene-app[data-step=jewel] .selene-finish-top>.selene-metal{grid-column:2;justify-content:center;align-items:center;gap:6px;margin:0}
#selene-app[data-step=jewel] .selene-ring-options+.selene-metal{justify-content:center;align-items:center;gap:6px;margin:4px 0 12px}
#selene-app[data-step=jewel] .selene-finish-top>.selene-no-chain{grid-column:3;justify-self:end;align-self:center;margin:0;padding:4px 0!important;font-size:12px;line-height:1.25;min-width:0;text-align:right;white-space:normal}
#selene-app[data-step=jewel] .selene-metal button{position:relative;width:44px;height:44px;min-width:44px;min-height:44px;padding:0;border:0;border-radius:50%;background:transparent;overflow:visible;box-shadow:none}
#selene-app[data-step=jewel] .selene-metal button:before{inset:auto;top:50%;left:50%;width:32px;height:32px;margin:0;transform:translate(-50%,-50%);border-radius:50%}
#selene-app[data-step=jewel] .selene-metal button.is-selected:after{content:'';position:absolute;top:50%;left:50%;width:40px;height:40px;box-sizing:border-box;border:2px solid #8564a9;border-radius:50%;transform:translate(-50%,-50%);pointer-events:none}
@media(max-width:760px){
 #selene-app[data-step=jewel] .selene-finish-top{margin-bottom:4px;gap:4px}
 #selene-app[data-step=jewel] .selene-metal button:before{width:28px;height:28px}
 #selene-app[data-step=jewel] .selene-metal button.is-selected:after{width:36px;height:36px}
 #selene-app[data-step=jewel] .selene-finish-top>.selene-no-chain{font-size:10px}
}

/* Compact mobile avatar controls and configurable empty-point highlight. */
@media(max-width:760px){
 #selene-app[data-step=avatar] .selene-header h2{font-size:min(calc(var(--selene-title-size,30px)*.8),5.6vw)!important}
 #selene-app[data-step=avatar] .selene-stage-frame{width:clamp(96px,calc(var(--selene-view-height,100svh) - 452px),270px)}
 #selene-app[data-step=avatar] .selene-controls{padding:4px 12px 4px}
 #selene-app[data-step=avatar] .selene-category-heading{margin:0 0 3px;grid-template-columns:44px minmax(0,1fr) 44px}
 #selene-app[data-step=avatar] .selene-category-heading .selene-flow-arrow{width:44px;height:44px;min-width:44px;min-height:44px}
 #selene-app[data-step=avatar] .selene-category-title{font-size:clamp(18px,5vw,22px)!important;line-height:1.1}
 #selene-app[data-step=avatar] .selene-grid{gap:4px;margin:0 0 4px}
 #selene-app[data-step=avatar] .selene-card{padding:2px 3px!important;gap:2px;font-size:11px!important;min-height:44px}
 #selene-app[data-step=avatar] .selene-card>span{line-height:1.2;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
 #selene-app[data-step=avatar][data-category=hair] .selene-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
 #selene-app[data-step=avatar][data-category=hair] .selene-card-avatar img{height:clamp(36px,7svh,64px);width:100%;object-fit:contain}
 #selene-app[data-step=avatar][data-category=clothes] .selene-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 #selene-app[data-step=avatar][data-category=clothes] .selene-card-clothing img{height:clamp(40px,7svh,64px);width:100%;object-fit:contain}
 #selene-app[data-step=avatar][data-category=details] .selene-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
 #selene-app[data-step=avatar][data-category=details] .selene-card-avatar img{height:clamp(28px,calc(8svh - 16px),54px);width:100%;object-fit:contain}
 #selene-app[data-step=avatar] .selene-controls .selene-color{margin:3px 0;min-height:38px;font-size:12px!important;gap:6px}
 #selene-app[data-step=avatar] .selene-color input[type=color]{width:34px;height:34px;min-width:34px}
 #selene-app[data-step=avatar] .selene-avatar-color-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:center;gap:12px}
 #selene-app[data-step=avatar] .selene-avatar-color-row .selene-color>span{min-width:0;line-height:1.2}
 #selene-app[data-step=avatar] .selene-avatar-color-row .selene-blush-toggle{margin:3px 0;min-height:38px;font-size:12px;gap:6px}
 #selene-app[data-step=avatar] .selene-skin-swatches{gap:12px;margin:4px 0 6px}
 #selene-app[data-step=avatar] .selene-skin-swatches button{width:30px;height:30px;min-width:30px}
 #selene-app[data-step=avatar] .selene-skin-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:center;gap:12px}
 #selene-app[data-step=avatar] .selene-skin-options .selene-color>span{line-height:1.15;font-size:11px;min-width:0}
 #selene-app[data-step=avatar] .selene-skin-options .selene-vitiligo-option{margin:3px 0;min-height:38px;font-size:12px;gap:6px}
 #selene-app[data-step=avatar] .selene-skin-options .selene-vitiligo-swatch{width:30px;height:30px;min-width:30px}
 #selene-app[data-step=avatar] .selene-skin-options .selene-vitiligo-swatch:before{width:30px;height:30px}
 #selene-app[data-step=avatar] .selene-mobile-background-open{display:block;width:100%;min-height:38px;border:0;background:transparent;color:#8564a9;text-align:left;text-decoration:underline;padding:5px 0;font-size:12px}
 #selene-app[data-step=avatar] .selene-pager{margin:0}
 #selene-app[data-step=avatar] .selene-avatar-detail-tabs{display:flex;gap:16px;width:100%;margin:0 0 3px}
 #selene-app[data-step=avatar] .selene-avatar-detail-tabs button{flex:1;min-width:0;min-height:40px;padding:7px 3px;border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;box-shadow:none;color:#8564a9;font-weight:400;font-size:13px}
 #selene-app[data-step=avatar] .selene-avatar-detail-tabs button[aria-selected=true]{border-bottom-color:#8564a9;color:#572985;font-weight:600;background:transparent}
 #selene-app[data-step=avatar] .selene-avatar-detail-tabs button:hover{background:transparent;color:#572985}
 #selene-app[data-step=avatar] .selene-avatar-finish-top>.selene-metal{justify-content:center;gap:6px;margin:0 0 4px}
 #selene-app[data-step=avatar] .selene-avatar-finish-top .selene-metal button{width:44px;height:44px;min-width:44px;padding:0;border:0!important;border-radius:50%!important;background:transparent!important;box-shadow:none;-webkit-tap-highlight-color:transparent;overflow:visible}
 #selene-app[data-step=avatar] .selene-avatar-finish-top .selene-metal button:before{inset:auto;top:50%;left:50%;width:28px;height:28px;margin:0;transform:translate(-50%,-50%)}
 #selene-app[data-step=avatar] .selene-avatar-finish-top .selene-metal button.is-selected:after{content:'';position:absolute;left:50%;top:50%;width:36px;height:36px;box-sizing:border-box;border:2px solid #8564a9;border-radius:50%;transform:translate(-50%,-50%);pointer-events:none}
 .selene-mobile-background-dialog{width:min(360px,calc(100vw - 24px));max-height:calc(100svh - 24px);box-sizing:border-box;padding:18px;background:var(--cream,#edeae2);color:#572985;border:1px solid #8564a9;border-radius:0;overflow:auto}
 .selene-mobile-background-dialog::backdrop{background:#0005}
 .selene-mobile-background-dialog h3{font-size:20px;margin:0 0 14px}
 .selene-mobile-background-dialog .selene-color{margin:9px 0}
 .selene-mobile-background-dialog .selene-background-type{margin:9px 0}
 .selene-mobile-background-dialog .selene-background-type select{max-width:65%;padding:8px;background:#edeae2;color:#572985;border:1px solid #8564a9}
 .selene-mobile-background-dialog .selene-mobile-background-actions{display:flex;justify-content:space-between;gap:10px;margin-top:16px}
}
#selene-app[data-marker-highlight=true] .selene-point[data-occupied=false][data-focused=true]:after,
#selene-app[data-marker-highlight=true] .selene-point[data-occupied=false]:focus-visible:after{width:var(--selene-marker-highlight-size,22px);height:var(--selene-marker-highlight-size,22px);background:var(--selene-marker-highlight-fill,#b2c992);border:var(--selene-marker-highlight-border-width,2px) solid var(--selene-marker-highlight-border,#572985);opacity:var(--selene-marker-highlight-opacity,.9);outline:none}
@media(hover:hover) and (pointer:fine){#selene-app[data-marker-highlight=true] .selene-point[data-occupied=false]:hover:after{width:var(--selene-marker-highlight-size,22px);height:var(--selene-marker-highlight-size,22px);background:var(--selene-marker-highlight-fill,#b2c992);border:var(--selene-marker-highlight-border-width,2px) solid var(--selene-marker-highlight-border,#572985);opacity:var(--selene-marker-highlight-opacity,.9)}}

/* Desktop catalogue: compact decorations and consistently framed chain pairs. */
@media(min-width:761px){
 #selene-app[data-step=jewel]:is([data-category=charms],[data-category=beads]) .selene-gallery>.selene-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px 8px}
 #selene-app[data-step=jewel]:is([data-category=charms],[data-category=beads]) .selene-card{gap:3px;font-size:calc(var(--selene-text-size,14px)*.857142857)!important;padding:5px 3px}
 #selene-app[data-step=jewel]:is([data-category=charms],[data-category=beads]) .selene-card>span{max-width:100%;overflow-wrap:anywhere}
 #selene-app[data-step=jewel] .selene-card-charm img,#selene-app[data-step=jewel] .selene-card-bead img,#selene-app[data-step=jewel] .selene-card-composition img{height:64px}
 #selene-app[data-step=jewel][data-category=chain] .selene-gallery>.selene-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 #selene-app[data-step=jewel] .selene-card-chain{grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto;justify-items:center;gap:4px;padding:5px 7px!important}
 #selene-app[data-step=jewel] .selene-card-chain img{grid-column:1;grid-row:1;width:100%;max-width:220px;height:auto;aspect-ratio:var(--selene-chain-preview-aspect,2);object-fit:contain}
 #selene-app[data-step=jewel] .selene-card-chain small{grid-column:1;grid-row:2;justify-self:center;font-size:11px}
}

/* Compact mobile jewellery selection and native ring disclosure. */
#selene-app[data-compact-jewel] .selene-ring-label{font-family:var(--selene-site-paragraph-family,inherit)!important;font-size:var(--selene-site-paragraph-size,1rem)!important;font-weight:var(--selene-site-paragraph-weight,400)!important;font-style:var(--selene-site-paragraph-style,normal)!important;line-height:var(--selene-site-paragraph-line,1.65)!important;letter-spacing:var(--selene-site-paragraph-spacing,normal)!important;text-transform:var(--selene-site-paragraph-case,none)!important;text-align:center;margin:0 0 2px}
#selene-app[data-compact-jewel] .selene-ring-section{margin:0;padding:0;border:0}
#selene-app[data-compact-jewel] .selene-ring-section>summary{position:relative;display:block;min-height:28px;margin:0;padding:1px 24px;list-style:none;cursor:pointer;color:#8564a9;-webkit-tap-highlight-color:transparent}
#selene-app[data-compact-jewel] .selene-ring-section>summary::-webkit-details-marker{display:none}
#selene-app[data-compact-jewel] .selene-ring-section>summary:before{content:none}
#selene-app[data-compact-jewel] .selene-ring-chevron{position:absolute;left:4px;top:50%;transform:translateY(-50%);font-size:12px;line-height:1;color:currentColor}
#selene-app[data-compact-jewel] .selene-ring-section[open] .selene-ring-chevron{transform:translateY(-50%) rotate(90deg)}
#selene-app[data-compact-jewel] .selene-ring-section:not([open])>.selene-compact-ring-row{display:none}
#selene-app .selene-palette>.selene-palette-label{margin:0;padding:12px 0;font-weight:600}
@media(max-width:760px){
 #selene-app[data-compact-jewel][data-step=jewel] .selene-header{padding:6px 12px 0}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-header h2{font-size:22px!important;line-height:1.15;margin:0 0 2px}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-steps{gap:8px}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-steps button{min-height:30px;padding:4px 5px;font-size:10px}
 #selene-app[data-compact-jewel][data-step=jewel]>.selene-status{height:16px;min-height:16px;font-size:10px;line-height:14px;margin:0}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-toolbar{min-height:36px;margin:0;padding:0 4px}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-toolbar .selene-link{min-height:36px;padding:6px 0;font-size:10px}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-history button{height:36px;min-height:36px;width:32px;min-width:32px;font-size:24px;padding:0}
 #selene-app[data-compact-jewel].selene-mobile-focus[data-step=jewel] .selene-stage{height:clamp(132px,calc(var(--selene-view-height,100svh)*.27),208px)}
 #selene-app[data-compact-jewel][data-compact-jewel-height=tight].selene-mobile-focus[data-step=jewel] .selene-stage{height:clamp(132px,calc(var(--selene-view-height,100svh)*.27 - 40px),180px)}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-rail{min-height:48px;margin-top:-12px;padding:0 0 2px;gap:10px}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-round-icon{width:40px;height:40px;min-width:40px}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-round-icon.is-current{width:48px;height:48px;min-width:48px}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-camera-actions{min-height:32px;margin:0;padding:0}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-camera-actions{align-items:center;gap:12px}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-camera-toggle{min-height:32px;font-size:10px;padding:5px 12px}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-camera-toggle:before{inset:3px 0}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-controls{padding:0 12px 4px}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-category-heading{margin:0 0 2px;gap:4px;grid-template-columns:36px minmax(0,1fr) 36px}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-category-heading .selene-flow-arrow{width:36px;height:36px;min-width:36px;min-height:36px;font-size:28px}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-category-title{font-size:22px!important;line-height:1.15}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-finish-top{min-height:36px;margin:0 0 2px}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-metal button{width:36px;height:36px;min-width:36px;min-height:36px}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-metal button:before{width:24px;height:24px}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-metal button.is-selected:after{width:32px;height:32px}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-section-title{font-size:14px;margin:0 0 2px;line-height:1.2}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-grid{margin:0 0 2px;gap:4px 8px}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-gallery>.selene-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 #selene-app[data-compact-jewel][data-step=jewel]:is([data-category=charms],[data-category=beads]) .selene-gallery>.selene-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-card{min-height:44px;padding:3px!important;gap:2px;font-size:11px!important;line-height:1.15}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-card small{font-size:10px;line-height:1.2}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-card-base{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:26px 12px;gap:0;justify-items:center}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-card-base img{width:100%;max-width:180px;height:26px;object-fit:contain;grid-row:1;grid-column:1}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-card-base small{grid-column:1;grid-row:2}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-card-chain{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto 12px;justify-items:center;gap:2px}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-card-chain img{width:100%;max-width:160px;height:auto;max-height:64px;aspect-ratio:var(--selene-chain-preview-aspect,2);object-fit:contain;grid-row:1;grid-column:1}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-card-chain small{grid-row:2;grid-column:1;justify-self:center}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-card-base>span,#selene-app[data-compact-jewel][data-step=jewel] .selene-card-chain>span{display:none}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-card-charm img,#selene-app[data-compact-jewel][data-step=jewel] .selene-card-bead img,#selene-app[data-compact-jewel][data-step=jewel] .selene-card-composition img{height:36px}
 #selene-app[data-compact-jewel][data-step=jewel]:is([data-category=charms],[data-category=beads]) .selene-card>span{font-size:11px;height:2.3em;min-height:2.3em;max-height:2.3em;line-height:1.15;overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-category-instructions{font-size:12px!important;line-height:1.3;margin:0 0 5px;text-align:center}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-pager{min-height:32px;margin:0}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-pager>.selene-page-arrow{min-height:32px;height:32px;padding:2px 6px}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-page-counter{font-size:11px;line-height:1.2;color:#8564a9}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-page-dots{gap:0;align-items:center}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-page-dots button{position:relative;width:24px;height:24px;min-width:24px;min-height:24px;padding:0;background:transparent;border:0;box-shadow:none}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-page-dots button:before{content:'';position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:6px;height:6px;border-radius:50%;background:#8564a9;opacity:.65}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-page-dots button[aria-current=page]:before{width:8px;height:8px;background:#572985;opacity:1}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-chosen-details{margin:2px 0;padding:0;border:0;line-height:14px}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-chosen-details summary{padding:4px 0;margin:0;font-size:11px;line-height:14px;min-height:0;height:22px}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-palette{padding:0;margin:2px 0}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-palette>.selene-palette-label{font-size:11px;padding:4px 0;line-height:1.25}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-palette .selene-swatches{display:grid;grid-template-columns:repeat(10,24px);justify-content:center;gap:4px;margin:4px 0;padding:2px}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-palette .selene-swatches button{width:24px;height:24px;min-width:24px;border-width:2px}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-help{font-size:11px!important;line-height:1.25;margin:2px 0;padding:4px}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-compact-ring-row{display:flex;flex-direction:column;align-items:stretch;gap:2px;margin:0 0 2px}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-ring-options{grid-template-columns:repeat(2,minmax(0,1fr));margin:0;gap:6px}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-ring-options .selene-card{display:flex;flex-direction:column;align-items:center;padding:1px!important;font-size:10px!important;gap:0}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-ring-options img{height:22px;width:32px;object-fit:contain}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-ring-options .selene-card>span{line-height:1.1;min-height:1.1em;max-height:2.2em;font-size:10px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-ring-options .selene-card>small{font-size:10px;line-height:10px}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-compact-ring-row>.selene-metal{margin:0;gap:2px;justify-content:center}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-compact-ring-row~.selene-palette .selene-swatches{margin:2px 0}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-compact-ring-row~.selene-palette>.selene-palette-label{padding:2px 0}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-ring-section~.selene-palette .selene-swatches{margin:2px 0}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-ring-section~.selene-palette>.selene-palette-label{padding:2px 0}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-footer{padding:6px 12px;min-height:70px;height:auto;gap:8px}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-footer .selene-primary{padding:8px 12px;min-height:40px;font-size:12px}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-total{font-size:20px;line-height:1.2}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-jewelry-description{font-size:10px}
 #selene-app[data-compact-jewel][data-compact-jewel-height=tight][data-step=jewel] .selene-category-heading{grid-template-columns:32px minmax(0,1fr) 32px}
 #selene-app[data-compact-jewel][data-compact-jewel-height=tight][data-step=jewel] .selene-rail{margin-top:0}
 #selene-app[data-compact-jewel][data-compact-jewel-height=tight][data-step=jewel] .selene-category-heading .selene-flow-arrow{width:32px;height:32px;min-width:32px;min-height:32px}
 #selene-app[data-compact-jewel][data-compact-jewel-height=tight][data-step=jewel] .selene-finish-top{min-height:32px}
 #selene-app[data-compact-jewel][data-compact-jewel-height=tight][data-step=jewel] .selene-metal button{width:32px;height:32px;min-width:32px;min-height:32px}
 #selene-app[data-compact-jewel][data-compact-jewel-height=tight][data-step=jewel] .selene-category-instructions{font-size:11px!important;line-height:1.2}
 #selene-app[data-compact-jewel][data-compact-jewel-height=tight][data-step=jewel] .selene-card{padding:1px!important}
 #selene-app[data-compact-jewel][data-compact-jewel-height=tight][data-step=jewel] .selene-card-charm img,#selene-app[data-compact-jewel][data-compact-jewel-height=tight][data-step=jewel] .selene-card-bead img,#selene-app[data-compact-jewel][data-compact-jewel-height=tight][data-step=jewel] .selene-card-composition img{height:30px}
 #selene-app[data-compact-jewel][data-compact-jewel-height=tight][data-step=jewel] .selene-card-chain img{max-height:52px}
}


/* Larger mobile portrait and camera control beside undo/redo. */
@media(max-width:760px){
 #selene-app[data-compact-jewel][data-compact-jewel-height].selene-mobile-focus[data-step=jewel] .selene-stage{height:clamp(220px,calc(var(--selene-view-height,100svh)*.36),320px)}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-toolbar-with-undo{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:4px;min-height:40px}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-history{gap:0;min-width:0}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-history>.selene-undo{width:30px;min-width:30px;min-height:36px}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-history>.selene-camera-actions{display:flex;min-height:36px;margin:0 0 0 5px;padding:0;gap:0}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-history .selene-camera-toggle{width:auto;height:36px;min-width:0;min-height:36px;font-size:10px;line-height:1.2;padding:5px 7px;white-space:nowrap}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-history .selene-camera-toggle:before{inset:4px 0}
 #selene-app:is([data-step=avatar],[data-step=jewel]) .selene-stage>.selene-save-image{font-size:9px;line-height:1.2;min-height:24px;padding:4px 6px;max-width:calc(100% - 14px)}
 #selene-app[data-step=jewel] .selene-stage>.selene-save-image{max-width:calc(100% - 66px)}
 /* The centred portrait is narrower than the page; keep its save control at the page's left edge. */
 #selene-app[data-step=avatar] .selene-stage{overflow:visible}
 #selene-app[data-step=avatar] .selene-stage>.selene-save-image{left:calc((100% - var(--selene-app-width,100%))/2 + 7px)}
 #selene-app[data-compact-jewel][data-step=jewel] .selene-rail{margin-top:0}
}

/* Contextual decoration editor, outside the scaled camera world. */
#selene-app[data-step=jewel] .selene-stage>.selene-decoration-editor{position:absolute;z-index:6;left:8px;bottom:auto;top:38px;box-sizing:border-box;width:calc(100% - 72px);max-width:320px;padding:6px 9px 9px;margin:0;display:flex;flex-direction:column;gap:3px;border:1px solid #8564a96b;border-radius:0;background:rgba(237,234,226,.68);color:#572985;box-shadow:2px 3px 12px #34214126;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}
#selene-app[data-step=jewel] .selene-decoration-editor-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%}
#selene-app[data-step=jewel] .selene-decoration-editor-heading strong{font-size:12px;line-height:1.2;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;min-width:0}
#selene-app[data-step=jewel] .selene-decoration-editor button,#selene-app[data-step=jewel] .selene-decoration-editor button:is(:hover,:focus,:active){font-size:10px;line-height:1.2;font-weight:500;color:#572985;background:transparent;box-shadow:none;border:0;border-radius:0;padding:5px 6px;min-height:36px;transform:none}
#selene-app[data-step=jewel] .selene-decoration-editor .selene-decoration-close{font:24px/1 Arial,sans-serif;min-width:30px;min-height:28px;height:28px;padding:0;flex:none;color:#8564a9}
#selene-app[data-step=jewel] .selene-decoration-editor-actions{display:flex;align-items:center;gap:6px;width:100%}
#selene-app[data-step=jewel] .selene-stage .selene-decoration-editor .selene-metal{margin:0;gap:0;display:flex;flex:0 0 auto}
#selene-app[data-step=jewel] .selene-stage .selene-decoration-editor .selene-metal button{position:relative;width:32px;min-width:32px;min-height:36px;height:36px;padding:0;font-size:0;color:transparent}
#selene-app[data-step=jewel] .selene-stage .selene-decoration-editor .selene-metal button:before{width:22px;height:22px}
#selene-app[data-step=jewel] .selene-stage .selene-decoration-editor .selene-metal button.is-selected:after{width:29px;height:29px}
#selene-app[data-step=jewel] .selene-decoration-editor .selene-flip-toggle{flex:1;min-width:0;border:1px solid #8564a966}
#selene-app[data-step=jewel] .selene-decoration-editor .selene-flip-toggle[aria-pressed=true]{border-color:#572985;background:#8564a926}
#selene-app[data-step=jewel] .selene-decoration-editor .selene-decoration-delete{flex:0 0 auto;text-decoration:underline;padding-left:4px;padding-right:2px}
#selene-app[data-step=jewel] .selene-decoration-editor button:focus-visible{outline:2px solid #8564a9;outline-offset:1px}
#selene-app[data-step=jewel] .selene-decoration-editor:focus{outline:none}

/* Dark translucent surface and white editing labels. */
#selene-app[data-step=jewel] .selene-stage>.selene-decoration-editor{background:rgba(28,20,38,.76);color:#fff;border-color:#ffffff45;box-shadow:2px 3px 12px #0004}
#selene-app[data-step=jewel] .selene-decoration-editor button,#selene-app[data-step=jewel] .selene-decoration-editor button:is(:hover,:focus,:active){color:#fff}
#selene-app[data-step=jewel] .selene-decoration-editor .selene-decoration-close{color:#fff}
#selene-app[data-step=jewel] .selene-decoration-editor .selene-flip-toggle{border-color:#ffffff73}
#selene-app[data-step=jewel] .selene-decoration-editor .selene-flip-toggle[aria-pressed=true]{border-color:#fff;background:#ffffff1f}
#selene-app[data-step=jewel] .selene-stage .selene-decoration-editor .selene-metal button{color:transparent}
#selene-app[data-step=jewel] .selene-stage .selene-decoration-editor .selene-metal button.is-selected:after{border-color:#fff}
#selene-app[data-step=jewel] .selene-decoration-editor button:focus-visible{outline-color:#fff}
