/* One look for every popup's chrome, whichever file built it: the title, the corner close (×) and the corner sound button.
   Layout and positions stay with each popup; only how these three things look is shared. Loaded last on purpose. */
:root{--pu-ink:#5d3978;--pu-btn:#f3ebfa;--pu-btn-ink:#6b4a8a;--pu-btn-edge:#e1d2ee;--pu-size:56px}

/* titles */
html body #v2-dialog>header h2,
html body #modal .modal-top h2,
html body dialog.calm-settings h2,
html body .b3d-dialog h2,
html body .sb-album-dialog h2,
html body .sb-pair-dialog h2,
html body .mochi-dialog header h2{font-family:"Grandstander",ui-rounded,system-ui,sans-serif!important;font-weight:900!important;font-size:clamp(24px,2.6vw,32px)!important;line-height:1.15!important;letter-spacing:0!important;text-transform:none!important;color:var(--pu-ink)!important}

/* corner close: the circle from ipad-windows.css (56px, soft lilac, white rim), now on every popup.
   Text crosses are normalised to "×" by popup-unify.js; icon-only closes get the same × drawn in. */
html body #v2-dialog>header>button[data-v2=close],
html body #modal .modal-top .icon-button[data-action=close],
html body .v2q-x,html body .gm-x,html body .calm-close,html body .tr-x,html body .ss-x,html body .rare-x,
html body .sb-pair-close,html body .sb-album-close,html body .mo-close,html body .b3d-close,html body .av-x,
html body .arcade-popup-close,html body .v2-try-x,html body .v2l-me button[data-me=close]{
 width:var(--pu-size)!important;height:var(--pu-size)!important;min-width:0!important;min-height:0!important;flex:0 0 var(--pu-size)!important;padding:0!important;
 display:grid!important;place-items:center!important;border:1px solid #fff!important;border-radius:50%!important;background:var(--pu-btn)!important;box-shadow:0 3px 7px #6b4a6530!important;
 color:var(--pu-ink)!important;font:400 30px/1 system-ui,sans-serif!important;cursor:pointer}
html body #modal .modal-top .icon-button[data-action=close]>*{display:none!important}
html body #modal .modal-top .icon-button[data-action=close]::before{content:'×'}
html body :is(#v2-dialog>header>button[data-v2=close],#modal .modal-top .icon-button[data-action=close],.v2q-x,.gm-x,.calm-close,.tr-x,.ss-x,.rare-x,.sb-pair-close,.sb-album-close,.mo-close,.b3d-close,.av-x,.arcade-popup-close,.v2-try-x,.v2l-me button[data-me=close]):active{translate:0 2px}

/* corner sound button: the same circle, beside the close */
html body .v2q-say,html body #modal .modal-top .kid-help,html body .gm-coin-sheet .kid-help,html body .arcade-popup-hear,html body .v2l-name-hear{
 width:var(--pu-size)!important;height:var(--pu-size)!important;min-width:0!important;min-height:0!important;padding:0!important;display:grid!important;place-items:center!important;
 border:1px solid #fff!important;border-radius:50%!important;background:var(--pu-btn)!important;box-shadow:0 3px 7px #6b4a6530!important;color:var(--pu-ink)!important;font-size:24px!important}
html body :is(.v2q-say,#modal .modal-top .kid-help,.gm-coin-sheet .kid-help,.arcade-popup-hear,.v2l-name-hear) svg{width:26px!important;height:26px!important}

/* the old "Me" sheet gets the popup frame, a title and the corner close */
html body .v2l-me>div{position:relative;padding:22px 22px 20px!important;border:3px solid #fffdf7!important;border-radius:32px!important;background:#fff9ed!important;box-shadow:0 18px 50px #3a245047!important}
html body .v2l-me>div::before{content:'Your name';display:block;margin:0 60px 6px 0;font:900 clamp(24px,2.6vw,32px)/1.15 "Grandstander",ui-rounded,system-ui,sans-serif;color:var(--pu-ink);text-align:left}
html body .v2l-me button[data-me=close]{position:absolute!important;top:14px;right:14px}

/* 3D icons that replaced leftover emoji */
html body img.pu-ico{display:inline-block;width:1.25em;height:1.25em;object-fit:contain;vertical-align:-.25em;filter:none}
html body :is(.v2q-say,.arcade-popup-hear,.v2l-name-hear,.kid-help) img.pu-ico{width:34px;height:34px;vertical-align:middle}
html body dialog[open] .settings-actions>button.btn>span>img.pu-ico{width:30px;height:30px;vertical-align:middle}

/* Me sheet, tidied (Mac, 2026-10-18): the settings gear (goal-bar.js) is the same circle as the close, side by side in
   the title row; the name field and Save button match the rest of the game's popups. */
html body .v2l-me>div{width:min(400px,100%)!important;gap:14px!important}
html body .v2l-me>div::before{min-height:var(--pu-size);display:flex!important;align-items:center;margin:-6px calc(var(--pu-size)*2 + 4px) -4px 0!important}
html body .v2l-me button.tb-me-gear{position:absolute!important;top:14px!important;right:calc(14px + var(--pu-size) + 10px)!important;
 width:var(--pu-size)!important;height:var(--pu-size)!important;min-height:0!important;padding:12px!important;border:1px solid #fff!important;border-radius:50%!important;
 background:var(--pu-btn)!important;box-shadow:0 3px 7px #6b4a6530!important}
html body .v2l-me button.tb-me-gear:active{translate:0 2px}
html body .v2l-me img{width:132px!important;filter:drop-shadow(0 8px 10px #6b4a6526)}
html body .v2l-me input{min-height:60px;border:3px solid #e6d8f2!important;border-radius:20px!important;background:#fff;color:var(--pu-ink);font-weight:800!important;font-size:22px!important;box-shadow:0 2px 0 #f1e8f8 inset;outline:none}
html body .v2l-me input::placeholder{color:#b9a6c9}
html body .v2l-me input:focus{border-color:#b7e3d2!important;box-shadow:0 0 0 4px #b7e3d255}
html body .v2l-me button.go{min-height:60px!important;border:3px solid #fff!important;border-radius:20px!important;font-size:22px!important;color:#24584d!important;
 background:linear-gradient(#c4f0dd,#8fd6c0)!important;box-shadow:0 5px 0 #6fae9e,0 10px 18px #3d7c6c30!important}
html body .v2l-me button.go:active{translate:0 3px;box-shadow:0 2px 0 #6fae9e!important}
