/* R21 checklist 1, 4, 5, 13 — shared controls, existing tokens. */
body .jq-segmented{display:flex!important;align-items:stretch!important;gap:4px!important;width:100%!important;max-width:100%!important;min-width:0!important;padding:4px!important;overflow-x:auto;overscroll-behavior-inline:contain;border:1px solid var(--border)!important;border-radius:16px!important;background:var(--surface-2)!important;isolation:isolate;}
body .jq-segmented>.jq-segment{position:relative;display:inline-flex!important;align-items:center;justify-content:center;gap:6px;flex:1 0 auto!important;min-width:max-content!important;max-width:none!important;min-height:44px!important;padding:10px 14px!important;border:0!important;border-radius:12px!important;background:transparent!important;color:var(--ink)!important;white-space:nowrap!important;word-break:keep-all!important;font-family:inherit;font-size:14px!important;font-weight:600;line-height:1.25!important;box-shadow:none!important;text-decoration:none;}
body .jq-segmented>.jq-segment::after{display:none!important;}
body .jq-segmented>.jq-segment:is(.selected,.active,.is-selected,.is-active,[aria-selected=true],[aria-pressed=true]){background:var(--surface)!important;color:var(--primary-text)!important;box-shadow:0 2px 6px #43163812!important;}
body .jq-segmented>.jq-segment:focus-visible{outline:2px solid var(--primary-text);outline-offset:-3px;}
body .jq-segmented>.jq-segment .icon{width:18px;height:18px;flex:none;}
body[data-task=true] #header{display:grid;grid-template-columns:68px minmax(0,1fr) 68px;gap:4px;}
body[data-task=true] #header>.header-title{width:100%;max-width:none;}
body[data-task=true] #header>.btn:last-child{justify-self:end;margin:0;}
body[data-task=true] #header>.header-spacer{width:68px;}
.header-back{min-height:44px;display:inline-flex;align-items:center;justify-content:flex-start;gap:2px;padding:8px 0;background:transparent;color:var(--ink);font-size:14px;white-space:nowrap;}
.header-back .icon{width:20px;height:20px;}
/* Five equal cells; reserve the raised creation button above the navigation. */
body[data-nav=true]{--shell-nav:calc(var(--nav-height) + var(--border-thin) + 24px);--shell-bottom:calc(var(--shell-nav) + var(--shell-mini) + var(--safe-bottom));}
#bottom-nav{grid-template-columns:repeat(5,minmax(0,1fr));}
#bottom-nav .nav-create{position:relative;top:-20px;justify-self:center;align-self:start;transform:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:54px;width:min(64px,100%);padding:6px;border:3px solid var(--surface);border-radius:var(--radius-lg);background:var(--gradient-button);color:var(--on-primary);box-shadow:var(--shadow-button);font-size:12px;line-height:1.1;}
.nav-create .icon{width:22px;height:22px;}
.nav-create>span{display:flex;}
.nav-create strong{font-size:12px;}
#celebration-root{position:fixed;inset:0;pointer-events:none;z-index:var(--layer-celebrate);}
.jq-celebration-dock{display:flex;justify-content:flex-end;min-height:56px;padding:6px var(--page-pad);}
body:is([data-player-scene=true],[data-gift-world=true]) .jq-celebration-dock{padding-top:calc(var(--header-height) + var(--safe-top) + 6px);}
.jq-celebration-skip{position:static;pointer-events:auto;min-height:44px;padding:10px 16px;border:1px solid var(--border);border-radius:var(--radius-round);background:var(--surface);color:var(--ink);font:inherit;font-size:13px;box-shadow:var(--shadow-card);}
@media(prefers-reduced-motion:reduce){.jq-celebration,.jq-celebration-skip{display:none;}}
body[data-player-scene=true] #header .header-back{background:var(--p17-paper);color:var(--p17-ink);border-radius:22px;padding-inline:6px;}

#bottom-nav .nav-create:is(:active,.jq-pressed){transform:scale(var(--press-scale));}

/* Keep the two 44px view controls compact without consuming the search row. */
body .r16-works-command>.r7-view-switch.jq-segmented{width:102px!important;flex:0 0 102px;}
body .r16-works-command>.r7-view-switch>.jq-segment{flex:0 0 44px!important;min-width:44px!important;width:44px;padding:10px 0!important;}
